3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Something { public function otherThing(stdClass $canBeNullOrAnObject = null) { echo get_class($canBeNullOrAnObject); } } $s = new Something; $s->otherThing(); echo PHP_EOL; $s->otherThing(new stdClass);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3QLLK
function name:  (null)
number of ops:  12
compiled vars:  !0 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $1      'Something'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   12     3        INIT_METHOD_CALL                                         !0, 'otherThing'
          4        DO_FCALL                                      0          
   13     5        ECHO                                                     '%0A'
   14     6        INIT_METHOD_CALL                                         !0, 'otherThing'
          7        NEW                                              $5      'stdClass'
          8        DO_FCALL                                      0          
          9        SEND_VAR_NO_REF_EX                                       $5
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

Class Something:
Function otherthing:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3QLLK
function name:  otherThing
number of ops:  4
compiled vars:  !0 = $canBeNullOrAnObject
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV_INIT                                        !0      null
    7     1        GET_CLASS                                        ~1      !0
          2        ECHO                                                     ~1
    8     3      > RETURN                                                   null

End of function otherthing

End of class Something.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.9 ms | 1393 KiB | 13 Q