3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($ok = true) { if ($ok) { return array(1, 2); } return null; } list($a0, $b0) = foo(); echo json_encode($a0) . ', ' . json_encode($b0);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pTqoU
function name:  (null)
number of ops:  17
compiled vars:  !0 = $a0, !1 = $b0
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'foo'
          1        DO_FCALL                                      0  $2      
          2        FETCH_LIST_R                                     $3      $2, 0
          3        ASSIGN                                                   !0, $3
          4        FETCH_LIST_R                                     $5      $2, 1
          5        ASSIGN                                                   !1, $5
          6        FREE                                                     $2
   11     7        INIT_FCALL                                               'json_encode'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $7      
         10        CONCAT                                           ~8      $7, '%2C+'
         11        INIT_FCALL                                               'json_encode'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $9      
         14        CONCAT                                           ~10     ~8, $9
         15        ECHO                                                     ~10
         16      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 3
Branch analysis from position: 2
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pTqoU
function name:  foo
number of ops:  5
compiled vars:  !0 = $ok
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      <true>
    4     1      > JMPZ                                                     !0, ->3
    5     2    > > RETURN                                                   <array>
    7     3    > > RETURN                                                   null
    8     4*     > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.48 ms | 1398 KiB | 16 Q