3v4l.org

run code in 500+ PHP versions simultaneously
<?php var_dump(preg_grep('/.*/u', ['foo', 'bar'])); echo preg_last_error_msg(), "\n\n"; var_dump(preg_grep('/.*/u', ['foo', hex2bin('ff'), 'bar'])); echo preg_last_error_msg(), "\n\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/o7uDf
function name:  (null)
number of ops:  29
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'var_dump'
          1        INIT_FCALL                                                   'preg_grep'
          2        SEND_VAL                                                     '%2F.%2A%2Fu'
          3        SEND_VAL                                                     <array>
          4        DO_ICALL                                             $0      
          5        SEND_VAR                                                     $0
          6        DO_ICALL                                                     
    4     7        INIT_FCALL                                                   'preg_last_error_msg'
          8        DO_ICALL                                             $2      
          9        ECHO                                                         $2
         10        ECHO                                                         '%0A%0A'
    6    11        INIT_FCALL                                                   'var_dump'
         12        INIT_FCALL                                                   'preg_grep'
         13        SEND_VAL                                                     '%2F.%2A%2Fu'
         14        INIT_ARRAY                                           ~3      'foo'
         15        INIT_FCALL                                                   'hex2bin'
         16        SEND_VAL                                                     'ff'
         17        DO_ICALL                                             $4      
         18        ADD_ARRAY_ELEMENT                                    ~3      $4
         19        ADD_ARRAY_ELEMENT                                    ~3      'bar'
         20        SEND_VAL                                                     ~3
         21        DO_ICALL                                             $5      
         22        SEND_VAR                                                     $5
         23        DO_ICALL                                                     
    7    24        INIT_FCALL                                                   'preg_last_error_msg'
         25        DO_ICALL                                             $7      
         26        ECHO                                                         $7
         27        ECHO                                                         '%0A%0A'
         28      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
128.52 ms | 481 KiB | 11 Q