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('&#x0BA8;&#x0BBF;', 'UTF-8', 'HTML-ENTITIES'); $tests['string_length'] = (mb_strlen($test_string, 'UTF-8') === 2); $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)) . PHP_EOL; exit(1); } exit(0);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 26, Position 2 = 33
Branch analysis from position: 26
2 jumps found. (Code = 78) Position 1 = 27, Position 2 = 33
Branch analysis from position: 27
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 32
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
Branch analysis from position: 32
Branch analysis from position: 33
2 jumps found. (Code = 43) Position 1 = 37, Position 2 = 48
Branch analysis from position: 37
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 48
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 33
filename:       /in/liaKo
function name:  (null)
number of ops:  50
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%23x0BA8%3B%26%23x0BBF%3B'
          6        SEND_VAL                                                 'UTF-8'
          7        SEND_VAL                                                 'HTML-ENTITIES'
          8        DO_ICALL                                         $7      
          9        ASSIGN                                                   !1, $7
   10    10        INIT_FCALL                                               'mb_strlen'
         11        SEND_VAR                                                 !1
         12        SEND_VAL                                                 'UTF-8'
         13        DO_ICALL                                         $10     
         14        IS_IDENTICAL                                     ~11     $10, 2
         15        ASSIGN_DIM                                               !0, 'string_length'
         16        OP_DATA                                                  ~11
   11    17        INIT_FCALL                                               'preg_match'
         18        SEND_VAL                                                 '%2F%5E%5CX%5CX%5CX%24%2Fu'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                         $13     
         21        IS_IDENTICAL                                     ~14     $13, 1
         22        ASSIGN_DIM                                               !0, 'string_match'
         23        OP_DATA                                                  ~14
   13    24        ASSIGN                                                   !2, <array>
   14    25      > FE_RESET_R                                       $16     !0, ->33
         26    > > FE_FETCH_R                                       ~17     $16, !3, ->33
         27    >   ASSIGN                                                   !4, ~17
   15    28        TYPE_CHECK                                    4          !3
         29      > JMPZ                                                     ~19, ->32
   16    30    >   ASSIGN_DIM                                               !2, !4
         31        OP_DATA                                                  !3
   14    32    > > JMP                                                      ->26
         33    >   FE_FREE                                                  $16
   20    34        COUNT                                            ~21     !2
         35        IS_SMALLER                                               0, ~21
         36      > JMPZ                                                     ~22, ->48
   21    37    >   INIT_FCALL                                               'join'
         38        SEND_VAL                                                 '%2C+'
         39        INIT_FCALL                                               'array_keys'
         40        SEND_VAR                                                 !2
         41        DO_ICALL                                         $23     
         42        SEND_VAR                                                 $23
         43        DO_ICALL                                         $24     
         44        CONCAT                                           ~25     'Failed%3A+', $24
         45        CONCAT                                           ~26     ~25, '%0A'
         46        ECHO                                                     ~26
   22    47      > EXIT                                                     1
   25    48    > > EXIT                                                     0
         49*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.84 ms | 1400 KiB | 25 Q