3v4l.org

run code in 300+ PHP versions simultaneously
<?php class User { private $secret; public function __construct(User $user = null) { if ($user) { echo $user->secret = 'Not That interesting'; } } } $hasSecret = new User(); new User($hasSecret);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UGO4W
function name:  (null)
number of ops:  8
compiled vars:  !0 = $hasSecret
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'User'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   16     3        NEW                                              $4      'User'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
          6        FREE                                                     $4
          7      > RETURN                                                   1

Class User:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 5
Branch analysis from position: 2
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/UGO4W
function name:  __construct
number of ops:  6
compiled vars:  !0 = $user
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV_INIT                                        !0      null
    9     1      > JMPZ                                                     !0, ->5
   10     2    >   ASSIGN_OBJ                                       ~1      !0, 'secret'
          3        OP_DATA                                                  'Not+That+interesting'
          4        ECHO                                                     ~1
   12     5    > > RETURN                                                   null

End of function __construct

End of class User.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.47 ms | 1393 KiB | 13 Q