3v4l.org

run code in 300+ PHP versions simultaneously
<?php function newGetTranslationFilesPattern($langcode = NULL) { // The file name matches: drupal-[release version].[language code].po // When provided the $langcode is use as language code. If not provided all // language codes will match. return '!drupal-[0-9a-z\.-]+' . (!empty($langcode) ? '\.' . preg_quote($langcode, '!') : '') . '\.po$!'; } function oldGetTranslationFilesPattern($langcode = NULL) { // The file name matches: drupal-[release version].[language code].po // When provided the $langcode is use as language code. If not provided all // language codes will match. return '!drupal-[0-9a-z\.-]+\.' . (!empty($langcode) ? preg_quote($langcode, '!') : '[^\.]+') . '\.po$!'; } print "pcre.jit = " . ini_get('pcre.jit') . "\n"; print "Old: " . preg_match(oldGetTranslationFilesPattern(), 'drupal-8.0.0.de.po') . "\n"; print "New: " . preg_match(newGetTranslationFilesPattern(), 'drupal-8.0.0.de.po') . "\n\n"; ini_set('pcre.jit', 0); print "pcre.jit = " . ini_get('pcre.jit') . "\n"; print "Old: " . preg_match(oldGetTranslationFilesPattern(), 'drupal-8.0.0.de.po') . "\n"; print "New: " . preg_match(newGetTranslationFilesPattern(), 'drupal-8.0.0.de.po') . "\n\n"; ini_set('pcre.jit', 1); print "pcre.jit = " . ini_get('pcre.jit') . "\n"; print "Old: " . preg_match(oldGetTranslationFilesPattern(), 'drupal-8.0.0.de.po') . "\n"; print "New: " . preg_match(newGetTranslationFilesPattern(), 'drupal-8.0.0.de.po') . "\n\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/m091V
function name:  (null)
number of ops:  81
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_FCALL                                               'ini_get'
          1        SEND_VAL                                                 'pcre.jit'
          2        DO_ICALL                                         $0      
          3        CONCAT                                           ~1      'pcre.jit+%3D+', $0
          4        CONCAT                                           ~2      ~1, '%0A'
          5        ECHO                                                     ~2
   20     6        INIT_FCALL                                               'preg_match'
          7        INIT_FCALL                                               'oldgettranslationfilespattern'
          8        DO_FCALL                                      0  $3      
          9        SEND_VAR                                                 $3
         10        SEND_VAL                                                 'drupal-8.0.0.de.po'
         11        DO_ICALL                                         $4      
         12        CONCAT                                           ~5      'Old%3A+', $4
         13        CONCAT                                           ~6      ~5, '%0A'
         14        ECHO                                                     ~6
   21    15        INIT_FCALL                                               'preg_match'
         16        INIT_FCALL                                               'newgettranslationfilespattern'
         17        DO_FCALL                                      0  $7      
         18        SEND_VAR                                                 $7
         19        SEND_VAL                                                 'drupal-8.0.0.de.po'
         20        DO_ICALL                                         $8      
         21        CONCAT                                           ~9      'New%3A+', $8
         22        CONCAT                                           ~10     ~9, '%0A%0A'
         23        ECHO                                                     ~10
   23    24        INIT_FCALL                                               'ini_set'
         25        SEND_VAL                                                 'pcre.jit'
         26        SEND_VAL                                                 0
         27        DO_ICALL                                                 
   24    28        INIT_FCALL                                               'ini_get'
         29        SEND_VAL                                                 'pcre.jit'
         30        DO_ICALL                                         $12     
         31        CONCAT                                           ~13     'pcre.jit+%3D+', $12
         32        CONCAT                                           ~14     ~13, '%0A'
         33        ECHO                                                     ~14
   25    34        INIT_FCALL                                               'preg_match'
         35        INIT_FCALL                                               'oldgettranslationfilespattern'
         36        DO_FCALL                                      0  $15     
         37        SEND_VAR                                                 $15
         38        SEND_VAL                                                 'drupal-8.0.0.de.po'
         39        DO_ICALL                                         $16     
         40        CONCAT                                           ~17     'Old%3A+', $16
         41        CONCAT                                           ~18     ~17, '%0A'
         42        ECHO                                                     ~18
   26    43        INIT_FCALL                                               'preg_match'
         44        INIT_FCALL                                               'newgettranslationfilespattern'
         45        DO_FCALL                                      0  $19     
         46        SEND_VAR                                                 $19
         47        SEND_VAL                                                 'drupal-8.0.0.de.po'
         48        DO_ICALL                                         $20     
         49        CONCAT                                           ~21     'New%3A+', $20
         50        CONCAT                                           ~22     ~21, '%0A%0A'
         51        ECHO                                                     ~22
   28    52        INIT_FCALL                                               'ini_set'
         53        SEND_VAL                                                 'pcre.jit'
         54        SEND_VAL                                                 1
         55        DO_ICALL                                                 
   29    56        INIT_FCALL                                               'ini_get'
         57        SEND_VAL                                                 'pcre.jit'
         58        DO_ICALL                                         $24     
         59        CONCAT                                           ~25     'pcre.jit+%3D+', $24
         60        CONCAT                                           ~26     ~25, '%0A'
         61        ECHO                                                     ~26
   30    62        INIT_FCALL                                               'preg_match'
         63        INIT_FCALL                                               'oldgettranslationfilespattern'
         64        DO_FCALL                                      0  $27     
         65        SEND_VAR                                                 $27
         66        SEND_VAL                                                 'drupal-8.0.0.de.po'
         67        DO_ICALL                                         $28     
         68        CONCAT                                           ~29     'Old%3A+', $28
         69        CONCAT                                           ~30     ~29, '%0A'
         70        ECHO                                                     ~30
   31    71        INIT_FCALL                                               'preg_match'
         72        INIT_FCALL                                               'newgettranslationfilespattern'
         73        DO_FCALL                                      0  $31     
         74        SEND_VAR                                                 $31
         75        SEND_VAL                                                 'drupal-8.0.0.de.po'
         76        DO_ICALL                                         $32     
         77        CONCAT                                           ~33     'New%3A+', $32
         78        CONCAT                                           ~34     ~33, '%0A%0A'
         79        ECHO                                                     ~34
         80      > RETURN                                                   1

Function newgettranslationfilespattern:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/m091V
function name:  newGetTranslationFilesPattern
number of ops:  16
compiled vars:  !0 = $langcode
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV_INIT                                        !0      null
    9     1        ISSET_ISEMPTY_CV                                 ~1      !0
          2        BOOL_NOT                                         ~2      ~1
          3      > JMPZ                                                     ~2, ->11
          4    >   INIT_FCALL                                               'preg_quote'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 '%21'
          7        DO_ICALL                                         $3      
          8        CONCAT                                           ~4      '%5C.', $3
          9        QM_ASSIGN                                        ~5      ~4
         10      > JMP                                                      ->12
         11    >   QM_ASSIGN                                        ~5      ''
         12    >   CONCAT                                           ~6      '%21drupal-%5B0-9a-z%5C.-%5D%2B', ~5
         13        CONCAT                                           ~7      ~6, '%5C.po%24%21'
         14      > RETURN                                                   ~7
   10    15*     > RETURN                                                   null

End of function newgettranslationfilespattern

Function oldgettranslationfilespattern:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 10
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/m091V
function name:  oldGetTranslationFilesPattern
number of ops:  15
compiled vars:  !0 = $langcode
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV_INIT                                        !0      null
   16     1        ISSET_ISEMPTY_CV                                 ~1      !0
          2        BOOL_NOT                                         ~2      ~1
          3      > JMPZ                                                     ~2, ->10
          4    >   INIT_FCALL                                               'preg_quote'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 '%21'
          7        DO_ICALL                                         $3      
          8        QM_ASSIGN                                        ~4      $3
          9      > JMP                                                      ->11
         10    >   QM_ASSIGN                                        ~4      '%5B%5E%5C.%5D%2B'
         11    >   CONCAT                                           ~5      '%21drupal-%5B0-9a-z%5C.-%5D%2B%5C.', ~4
         12        CONCAT                                           ~6      ~5, '%5C.po%24%21'
         13      > RETURN                                                   ~6
   17    14*     > RETURN                                                   null

End of function oldgettranslationfilespattern

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.45 ms | 1411 KiB | 27 Q