3v4l.org

run code in 300+ PHP versions simultaneously
<?php class x { function foo() { print "\nfoo"; } } $x = new x(); $test = array($x, "foo"); echo is_callable($test) ? 'This is a callable' : 'This is not a callable'; echo "\n"; echo is_array($test) ? 'This is an array' : 'This is not an array'; $test();
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
Branch analysis from position: 19
filename:       /in/2pcWd
function name:  (null)
number of ops:  24
compiled vars:  !0 = $x, !1 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $2      'x'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   10     3        INIT_ARRAY                                       ~5      !0
          4        ADD_ARRAY_ELEMENT                                ~5      'foo'
          5        ASSIGN                                                   !1, ~5
   11     6        INIT_FCALL                                               'is_callable'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $7      
          9      > JMPZ                                                     $7, ->12
         10    >   QM_ASSIGN                                        ~8      'This+is+a+callable'
         11      > JMP                                                      ->13
         12    >   QM_ASSIGN                                        ~8      'This+is+not+a+callable'
         13    >   ECHO                                                     ~8
   12    14        ECHO                                                     '%0A'
   13    15        TYPE_CHECK                                  128          !1
         16      > JMPZ                                                     ~9, ->19
         17    >   QM_ASSIGN                                        ~10     'This+is+an+array'
         18      > JMP                                                      ->20
         19    >   QM_ASSIGN                                        ~10     'This+is+not+an+array'
         20    >   ECHO                                                     ~10
   14    21        INIT_DYNAMIC_CALL                                        !1
         22        DO_FCALL                                      0          
         23      > RETURN                                                   1

Class x:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2pcWd
function name:  foo
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     '%0Afoo'
    6     1      > RETURN                                                   null

End of function foo

End of class x.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.69 ms | 1396 KiB | 15 Q