3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = new ReflectionMethod('Closure', 'bind'); $reflection = new ReflectionFunction($x->getClosure()); var_dump(preg_match('/^\\s*?Method\\s*\\[\\s*static/i', $reflection->__toString())); var_dump($reflection->__toString());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WfLmr
function name:  (null)
number of ops:  26
compiled vars:  !0 = $x, !1 = $reflection
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $2      'ReflectionMethod'
          1        SEND_VAL_EX                                              'Closure'
          2        SEND_VAL_EX                                              'bind'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
    4     5        NEW                                              $5      'ReflectionFunction'
          6        INIT_METHOD_CALL                                         !0, 'getClosure'
          7        DO_FCALL                                      0  $6      
          8        SEND_VAR_NO_REF_EX                                       $6
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !1, $5
    5    11        INIT_FCALL                                               'var_dump'
         12        INIT_FCALL                                               'preg_match'
         13        SEND_VAL                                                 '%2F%5E%5Cs%2A%3FMethod%5Cs%2A%5C%5B%5Cs%2Astatic%2Fi'
         14        INIT_METHOD_CALL                                         !1, '__toString'
         15        DO_FCALL                                      0  $9      
         16        SEND_VAR                                                 $9
         17        DO_ICALL                                         $10     
         18        SEND_VAR                                                 $10
         19        DO_ICALL                                                 
    6    20        INIT_FCALL                                               'var_dump'
         21        INIT_METHOD_CALL                                         !1, '__toString'
         22        DO_FCALL                                      0  $12     
         23        SEND_VAR                                                 $12
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
191.15 ms | 1395 KiB | 17 Q