Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-55650

Library function s() - implement change for PHP 5.4 described in comment

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.2
    • 3.2
    • Libraries

      In the s() function there is a comment saying that certain changes should be made to the function parameters to make it faster once Moodle requires PHP 5.4.

      Since Moodle does in fact require PHP 5.4 I suggest we make the changes and remove the comment. I've checked and it seems like these changes will result in a very small performance improvement; on a typical course page where there are 8,000 calls to s(), it will probably save about 2ms. So not measurable in normal use but hey we make the code shorter by removing that commment...

      There is a fairly decent unit test covering s(), which still passes after this change.

        1. MDL-55650.xlsx
          11 kB
        2. test.php
          2 kB

            quen Sam Marshall
            quen Sam Marshall
            Tim Hunt Tim Hunt
            David Monllaó David Monllaó
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.