3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); $tests = array(); //$test_string = html_entity_decode('&#xAC00;&zwnj;&#xAC00;', ENT_COMPAT, 'UTF-8'); $uchar = mb_convert_encoding('&#' . intval(8204) . ';', 'UTF-8', 'HTML-ENTITIES'); $tests['string_length'] = (mb_strlen($uchar, 'UTF-8') === 1); $tests['string_match'] = (preg_match('/^\X$/u', $uchar) === 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 = 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/vXGAY
function name:  (null)
number of ops:  53
compiled vars:  !0 = $tests, !1 = $uchar, !2 = $fails, !3 = $value, !4 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 32767
          2        DO_ICALL                                                 
    4     3        ASSIGN                                                   !0, <array>
    6     4        INIT_FCALL                                               'mb_convert_encoding'
          5        CAST                                          4  ~7      8204
          6        CONCAT                                           ~8      '%26%23', ~7
          7        CONCAT                                           ~9      ~8, '%3B'
          8        SEND_VAL                                                 ~9
          9        SEND_VAL                                                 'UTF-8'
         10        SEND_VAL                                                 'HTML-ENTITIES'
         11        DO_ICALL                                         $10     
         12        ASSIGN                                                   !1, $10
    8    13        INIT_FCALL                                               'mb_strlen'
         14        SEND_VAR                                                 !1
         15        SEND_VAL                                                 'UTF-8'
         16        DO_ICALL                                         $13     
         17        IS_IDENTICAL                                     ~14     $13, 1
         18        ASSIGN_DIM                                               !0, 'string_length'
         19        OP_DATA                                                  ~14
    9    20        INIT_FCALL                                               'preg_match'
         21        SEND_VAL                                                 '%2F%5E%5CX%24%2Fu'
         22        SEND_VAR                                                 !1
         23        DO_ICALL                                         $16     
         24        IS_IDENTICAL                                     ~17     $16, 1
         25        ASSIGN_DIM                                               !0, 'string_match'
         26        OP_DATA                                                  ~17
   11    27        ASSIGN                                                   !2, <array>
   12    28      > FE_RESET_R                                       $19     !0, ->36
         29    > > FE_FETCH_R                                       ~20     $19, !3, ->36
         30    >   ASSIGN                                                   !4, ~20
   13    31        TYPE_CHECK                                    4          !3
         32      > JMPZ                                                     ~22, ->35
   14    33    >   ASSIGN_DIM                                               !2, !4
         34        OP_DATA                                                  !3
   12    35    > > JMP                                                      ->29
         36    >   FE_FREE                                                  $19
   18    37        COUNT                                            ~24     !2
         38        IS_SMALLER                                               0, ~24
         39      > JMPZ                                                     ~25, ->51
   19    40    >   INIT_FCALL                                               'join'
         41        SEND_VAL                                                 '%2C+'
         42        INIT_FCALL                                               'array_keys'
         43        SEND_VAR                                                 !2
         44        DO_ICALL                                         $26     
         45        SEND_VAR                                                 $26
         46        DO_ICALL                                         $27     
         47        CONCAT                                           ~28     'Failed%3A+', $27
         48        CONCAT                                           ~29     ~28, '%0A'
         49        ECHO                                                     ~29
   20    50      > EXIT                                                     1
   23    51    > > EXIT                                                     0
         52*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.35 ms | 1392 KiB | 25 Q