3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo(stdClass $bar = null) { echo 1; } $obj = (object)array('hello' => 1); foo($obj); foo((object)array('hello' => 1)); foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/quSkF
function name:  (null)
number of ops:  12
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   CAST                                          8  ~1      <array>
          1        ASSIGN                                                   !0, ~1
    8     2        INIT_FCALL                                               'foo'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0          
    9     5        INIT_FCALL                                               'foo'
          6        CAST                                          8  ~4      <array>
          7        SEND_VAL                                                 ~4
          8        DO_FCALL                                      0          
   10     9        INIT_FCALL                                               'foo'
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/quSkF
function name:  foo
number of ops:  3
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV_INIT                                        !0      null
    3     1        ECHO                                                     1
    4     2      > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.51 ms | 1397 KiB | 16 Q