3v4l.org

run code in 300+ PHP versions simultaneously
<?php $worked = false; if($a = function(){return null;}) $worked = true; assert(true == $worked); if($b = function(){return array('test'=>'test');}) $worked = false; assert(false == $worked); assert(false);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 15
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
Branch analysis from position: 5
filename:       /in/VRrXP
function name:  (null)
number of ops:  27
compiled vars:  !0 = $worked, !1 = $a, !2 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <false>
    4     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FVRrXP%3A4%240'
          2        ASSIGN                                           ~5      !1, ~4
          3      > JMPZ                                                     ~5, ->5
    5     4    >   ASSIGN                                                   !0, <true>
    6     5    >   ASSERT_CHECK                                             
          6        INIT_FCALL                                               'assert'
          7        BOOL                                             ~7      !0
          8        SEND_VAL                                                 ~7
          9        SEND_VAL                                                 'assert%28true+%3D%3D+%24worked%29'
         10        DO_ICALL                                                 
    7    11        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FVRrXP%3A7%241'
         12        ASSIGN                                           ~10     !2, ~9
         13      > JMPZ                                                     ~10, ->15
    8    14    >   ASSIGN                                                   !0, <false>
    9    15    >   ASSERT_CHECK                                             
         16        INIT_FCALL                                               'assert'
         17        BOOL_NOT                                         ~12     !0
         18        SEND_VAL                                                 ~12
         19        SEND_VAL                                                 'assert%28false+%3D%3D+%24worked%29'
         20        DO_ICALL                                                 
   10    21        ASSERT_CHECK                                             
         22        INIT_FCALL                                               'assert'
         23        SEND_VAL                                                 <false>
         24        SEND_VAL                                                 'assert%28false%29'
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

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

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

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

End of function %00%7Bclosure%7D%2Fin%2FVRrXP%3A7%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.05 ms | 1400 KiB | 15 Q