3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = "0"; $b = $a ? "1" : "2"; $test = function($a) use($b) { echo $a + $b; }; $test($b);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9WDgL
function name:  (null)
number of ops:  13
compiled vars:  !0 = $a, !1 = $b, !2 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '0'
    3     1      > JMPZ                                                     !0, ->4
          2    >   QM_ASSIGN                                        ~4      '1'
          3      > JMP                                                      ->5
          4    >   QM_ASSIGN                                        ~4      '2'
          5    >   ASSIGN                                                   !1, ~4
    5     6        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F9WDgL%3A5%240'
          7        BIND_LEXICAL                                             ~6, !1
          8        ASSIGN                                                   !2, ~6
    9     9        INIT_DYNAMIC_CALL                                        !2
         10        SEND_VAR_EX                                              !1
         11        DO_FCALL                                      0          
         12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F9WDgL%3A5%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9WDgL
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
    6     2        ADD                                              ~2      !0, !1
          3        ECHO                                                     ~2
    7     4      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F9WDgL%3A5%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.6 ms | 1394 KiB | 13 Q