3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($ok = true) { if ($ok) { return array('foo', 42); } return null; } list($a0, $b0) = foo(); printf("a: %s; b: %s", json_encode($a0), json_encode($b0));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YnQVS
function name:  (null)
number of ops:  19
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                                               'printf'
          8        SEND_VAL                                                 'a%3A+%25s%3B+b%3A+%25s'
          9        INIT_FCALL                                               'json_encode'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $7      
         12        SEND_VAR                                                 $7
         13        INIT_FCALL                                               'json_encode'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $8      
         16        SEND_VAR                                                 $8
         17        DO_ICALL                                                 
         18      > 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/YnQVS
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.54 ms | 1389 KiB | 18 Q