3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { function b (&$x = null) { $x = 1; return true; } } $a = new A(); $a->b(); $x = null; $a->b($x); var_dump($x);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qIGvK
function name:  (null)
number of ops:  13
compiled vars:  !0 = $a, !1 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $2      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    9     3        INIT_METHOD_CALL                                         !0, 'b'
          4        DO_FCALL                                      0          
   11     5        ASSIGN                                                   !1, null
   12     6        INIT_METHOD_CALL                                         !0, 'b'
          7        SEND_VAR_EX                                              !1
          8        DO_FCALL                                      0          
   13     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Class A:
Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qIGvK
function name:  b
number of ops:  4
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      null
    4     1        ASSIGN                                                   !0, 1
    5     2      > RETURN                                                   <true>
    6     3*     > RETURN                                                   null

End of function b

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.28 ms | 1395 KiB | 15 Q