3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Bar { public static function foo() { $array1 = array("a"=>1, "b"=>2, "c"=>3, "d"=>4, "e"=>5); print_r(array_filter($array1, 'Bar::baz')); } private static function baz($var) { return($var & 1); } } Bar::foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2XKJo
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_STATIC_METHOD_CALL                                  'Bar', 'foo'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Class Bar:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2XKJo
function name:  foo
number of ops:  9
compiled vars:  !0 = $array1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, <array>
    8     1        INIT_FCALL                                               'print_r'
          2        INIT_FCALL                                               'array_filter'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 'Bar%3A%3Abaz'
          5        DO_ICALL                                         $2      
          6        SEND_VAR                                                 $2
          7        DO_ICALL                                                 
    9     8      > RETURN                                                   null

End of function foo

Function baz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2XKJo
function name:  baz
number of ops:  4
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   13     1        BW_AND                                           ~1      !0, 1
          2      > RETURN                                                   ~1
   14     3*     > RETURN                                                   null

End of function baz

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
216.35 ms | 1386 KiB | 17 Q