3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* * This should produce failures when using a version of libpcre older than 8.32 */ error_reporting(E_ALL); $tests = array(); $test_string = mb_convert_encoding('&#xAC00;&#xAC01;&#x0BA8;', 'UTF-8', 'HTML-ENTITIES'); print "$test_string\n"; $tests['string_length'] = (mb_strlen($test_string, 'UTF-8') === 3); $tests['string_match'] = (preg_match('/^\X\X\X$/u', $test_string) === 1); $fails = array(); foreach ($tests as $key => $value) { if ($value === false) { $fails[$key] = $value; } } if (count($fails) > 0) { echo "Failed: " . join(', ', array_keys($fails)) . "\n"; exit(1); } exit(0);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 29, Position 2 = 36
Branch analysis from position: 29
2 jumps found. (Code = 78) Position 1 = 30, Position 2 = 36
Branch analysis from position: 30
2 jumps found. (Code = 43) Position 1 = 33, Position 2 = 35
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
Branch analysis from position: 35
Branch analysis from position: 36
2 jumps found. (Code = 43) Position 1 = 40, Position 2 = 51
Branch analysis from position: 40
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 51
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 36
filename:       /in/oLC6F
function name:  (null)
number of ops:  53
compiled vars:  !0 = $tests, !1 = $test_string, !2 = $fails, !3 = $value, !4 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 32767
          2        DO_ICALL                                                 
    7     3        ASSIGN                                                   !0, <array>
    8     4        INIT_FCALL                                               'mb_convert_encoding'
          5        SEND_VAL                                                 '%26%23xAC00%3B%26%23xAC01%3B%26%23x0BA8%3B'
          6        SEND_VAL                                                 'UTF-8'
          7        SEND_VAL                                                 'HTML-ENTITIES'
          8        DO_ICALL                                         $7      
          9        ASSIGN                                                   !1, $7
    9    10        NOP                                                      
         11        FAST_CONCAT                                      ~9      !1, '%0A'
         12        ECHO                                                     ~9
   11    13        INIT_FCALL                                               'mb_strlen'
         14        SEND_VAR                                                 !1
         15        SEND_VAL                                                 'UTF-8'
         16        DO_ICALL                                         $11     
         17        IS_IDENTICAL                                     ~12     $11, 3
         18        ASSIGN_DIM                                               !0, 'string_length'
         19        OP_DATA                                                  ~12
   12    20        INIT_FCALL                                               'preg_match'
         21        SEND_VAL                                                 '%2F%5E%5CX%5CX%5CX%24%2Fu'
         22        SEND_VAR                                                 !1
         23        DO_ICALL                                         $14     
         24        IS_IDENTICAL                                     ~15     $14, 1
         25        ASSIGN_DIM                                               !0, 'string_match'
         26        OP_DATA                                                  ~15
   14    27        ASSIGN                                                   !2, <array>
   15    28      > FE_RESET_R                                       $17     !0, ->36
         29    > > FE_FETCH_R                                       ~18     $17, !3, ->36
         30    >   ASSIGN                                                   !4, ~18
   16    31        TYPE_CHECK                                    4          !3
         32      > JMPZ                                                     ~20, ->35
   17    33    >   ASSIGN_DIM                                               !2, !4
         34        OP_DATA                                                  !3
   15    35    > > JMP                                                      ->29
         36    >   FE_FREE                                                  $17
   21    37        COUNT                                            ~22     !2
         38        IS_SMALLER                                               0, ~22
         39      > JMPZ                                                     ~23, ->51
   22    40    >   INIT_FCALL                                               'join'
         41        SEND_VAL                                                 '%2C+'
         42        INIT_FCALL                                               'array_keys'
         43        SEND_VAR                                                 !2
         44        DO_ICALL                                         $24     
         45        SEND_VAR                                                 $24
         46        DO_ICALL                                         $25     
         47        CONCAT                                           ~26     'Failed%3A+', $25
         48        CONCAT                                           ~27     ~26, '%0A'
         49        ECHO                                                     ~27
   23    50      > EXIT                                                     1
   26    51    > > EXIT                                                     0
         52*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.91 ms | 1400 KiB | 25 Q