3v4l.org

run code in 300+ PHP versions simultaneously
<?php set_error_handler(function ($_, $errstr) use ($pattern) { restore_error_handler(); echo 'handler:' . var_export($errstr, true) . \PHP_EOL; }); echo 'execution:' . \var_export(\preg_match('//u', "\xc3\x28"), true) . \PHP_EOL; echo 'error:' . var_export(\preg_last_error(), true) . \PHP_EOL; echo 'compilation:' . \var_export(\preg_match('/(/', 'a'), true) . \PHP_EOL; echo 'error:' . var_export(\preg_last_error(), true) . \PHP_EOL; \restore_error_handler(); echo 'ok:' . var_export(\preg_match('/./', 'a'), true) . \PHP_EOL; echo 'error:' . var_export(\preg_last_error(), true) . \PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2mqev
function name:  (null)
number of ops:  68
compiled vars:  !0 = $pattern
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'set_error_handler'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F2mqev%3A3%240'
          2        BIND_LEXICAL                                             ~1, !0
    6     3        SEND_VAL                                                 ~1
          4        DO_ICALL                                                 
    7     5        INIT_FCALL                                               'var_export'
          6        INIT_FCALL                                               'preg_match'
          7        SEND_VAL                                                 '%2F%2Fu'
          8        SEND_VAL                                                 '%C3%28'
          9        DO_ICALL                                         $3      
         10        SEND_VAR                                                 $3
         11        SEND_VAL                                                 <true>
         12        DO_ICALL                                         $4      
         13        CONCAT                                           ~5      'execution%3A', $4
         14        CONCAT                                           ~6      ~5, '%0A'
         15        ECHO                                                     ~6
    8    16        INIT_FCALL                                               'var_export'
         17        INIT_FCALL                                               'preg_last_error'
         18        DO_ICALL                                         $7      
         19        SEND_VAR                                                 $7
         20        SEND_VAL                                                 <true>
         21        DO_ICALL                                         $8      
         22        CONCAT                                           ~9      'error%3A', $8
         23        CONCAT                                           ~10     ~9, '%0A'
         24        ECHO                                                     ~10
    9    25        INIT_FCALL                                               'var_export'
         26        INIT_FCALL                                               'preg_match'
         27        SEND_VAL                                                 '%2F%28%2F'
         28        SEND_VAL                                                 'a'
         29        DO_ICALL                                         $11     
         30        SEND_VAR                                                 $11
         31        SEND_VAL                                                 <true>
         32        DO_ICALL                                         $12     
         33        CONCAT                                           ~13     'compilation%3A', $12
         34        CONCAT                                           ~14     ~13, '%0A'
         35        ECHO                                                     ~14
   10    36        INIT_FCALL                                               'var_export'
         37        INIT_FCALL                                               'preg_last_error'
         38        DO_ICALL                                         $15     
         39        SEND_VAR                                                 $15
         40        SEND_VAL                                                 <true>
         41        DO_ICALL                                         $16     
         42        CONCAT                                           ~17     'error%3A', $16
         43        CONCAT                                           ~18     ~17, '%0A'
         44        ECHO                                                     ~18
   11    45        INIT_FCALL                                               'restore_error_handler'
         46        DO_ICALL                                                 
   12    47        INIT_FCALL                                               'var_export'
         48        INIT_FCALL                                               'preg_match'
         49        SEND_VAL                                                 '%2F.%2F'
         50        SEND_VAL                                                 'a'
         51        DO_ICALL                                         $20     
         52        SEND_VAR                                                 $20
         53        SEND_VAL                                                 <true>
         54        DO_ICALL                                         $21     
         55        CONCAT                                           ~22     'ok%3A', $21
         56        CONCAT                                           ~23     ~22, '%0A'
         57        ECHO                                                     ~23
   13    58        INIT_FCALL                                               'var_export'
         59        INIT_FCALL                                               'preg_last_error'
         60        DO_ICALL                                         $24     
         61        SEND_VAR                                                 $24
         62        SEND_VAL                                                 <true>
         63        DO_ICALL                                         $25     
         64        CONCAT                                           ~26     'error%3A', $25
         65        CONCAT                                           ~27     ~26, '%0A'
         66        ECHO                                                     ~27
         67      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F2mqev%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2mqev
function name:  {closure}
number of ops:  13
compiled vars:  !0 = $_, !1 = $errstr, !2 = $pattern
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
    4     3        INIT_FCALL                                               'restore_error_handler'
          4        DO_ICALL                                                 
    5     5        INIT_FCALL                                               'var_export'
          6        SEND_VAR                                                 !1
          7        SEND_VAL                                                 <true>
          8        DO_ICALL                                         $4      
          9        CONCAT                                           ~5      'handler%3A', $4
         10        CONCAT                                           ~6      ~5, '%0A'
         11        ECHO                                                     ~6
    6    12      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F2mqev%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.7 ms | 1400 KiB | 23 Q