3v4l.org

run code in 300+ PHP versions simultaneously
<?php [5.5][0]; class ob { private $b = false; public function __construct($b=false) { if ($b) $this->b = $b; } public function __toString(){ return $b; } } class b {} $x = new b(); $ob = new ob(); $ob2 = new ob(true); if ($x) echo 'x/'; if ($ob) echo 'ob/'; if ($ob2) echo 'ob2/';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 15
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 17
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 19
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
Branch analysis from position: 17
Branch analysis from position: 15
filename:       /in/uI4fj
function name:  (null)
number of ops:  20
compiled vars:  !0 = $x, !1 = $ob, !2 = $ob2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   FETCH_DIM_R                                      ~3      <array>, 0
          1        FREE                                                     ~3
    3     2        DECLARE_CLASS                                            'ob'
   13     3        NEW                                              $4      'b'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $4
   14     6        NEW                                              $7      'ob'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !1, $7
   15     9        NEW                                              $10     'ob'
         10        SEND_VAL_EX                                              <true>
         11        DO_FCALL                                      0          
         12        ASSIGN                                                   !2, $10
   16    13      > JMPZ                                                     !0, ->15
         14    >   ECHO                                                     'x%2F'
   17    15    > > JMPZ                                                     !1, ->17
         16    >   ECHO                                                     'ob%2F'
   18    17    > > JMPZ                                                     !2, ->19
         18    >   ECHO                                                     'ob2%2F'
         19    > > RETURN                                                   1

Class ob:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
filename:       /in/uI4fj
function name:  __construct
number of ops:  5
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV_INIT                                        !0      <false>
    6     1      > JMPZ                                                     !0, ->4
          2    >   ASSIGN_OBJ                                               'b'
          3        OP_DATA                                                  !0
    7     4    > > RETURN                                                   null

End of function __construct

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

End of function __tostring

End of class ob.

Class b: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.95 ms | 1403 KiB | 13 Q