3v4l.org

run code in 300+ PHP versions simultaneously
<?php $route = new Route(); $route->setTarget(function(){}); $target = $route->getTarget(); if($target instanceof Closure) { echo 1; }else { echo 0; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OIHch
function name:  (null)
number of ops:  16
compiled vars:  !0 = $route, !1 = $target
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'Route'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    4     3        INIT_METHOD_CALL                                         !0, 'setTarget'
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FOIHch%3A4%240'
          5        SEND_VAL_EX                                              ~5
          6        DO_FCALL                                      0          
    5     7        INIT_METHOD_CALL                                         !0, 'getTarget'
          8        DO_FCALL                                      0  $7      
          9        ASSIGN                                                   !1, $7
    6    10        INSTANCEOF                                               !1, 'Closure'
         11      > JMPZ                                                     ~9, ->14
    8    12    >   ECHO                                                     1
         13      > JMP                                                      ->15
   11    14    >   ECHO                                                     0
   12    15    > > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FOIHch%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OIHch
function name:  {closure}
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FOIHch%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.61 ms | 1394 KiB | 13 Q