3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Whatever { public function kissMe(Whatever $arg = null) { if ($arg === null) { echo 'no way'; } else { echo 'smooch'; } } } $whatever = new Whatever(); $nothing = null; $whatever->kissMe($whatever); $whatever->kissMe($nothing);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JXIkj
function name:  (null)
number of ops:  11
compiled vars:  !0 = $whatever, !1 = $nothing
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $2      'Whatever'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   10     3        ASSIGN                                                   !1, null
   12     4        INIT_METHOD_CALL                                         !0, 'kissMe'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
   13     7        INIT_METHOD_CALL                                         !0, 'kissMe'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

Class Whatever:
Function kissme:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JXIkj
function name:  kissMe
number of ops:  7
compiled vars:  !0 = $arg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV_INIT                                        !0      null
    5     1        TYPE_CHECK                                    2          !0
          2      > JMPZ                                                     ~1, ->5
          3    >   ECHO                                                     'no+way'
          4      > JMP                                                      ->6
          5    >   ECHO                                                     'smooch'
    6     6    > > RETURN                                                   null

End of function kissme

End of class Whatever.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.67 ms | 1394 KiB | 13 Q