3v4l.org

run code in 300+ PHP versions simultaneously
<?php class trial{ public $id; public static $sid; public function show(){ if (trial::sid) echo trial::sid; else echo $this->id; } } $obj = new trial(); $obj->id = 1; $obj->show();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Z7gg2
function name:  (null)
number of ops:  8
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'trial'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   14     3        ASSIGN_OBJ                                               !0, 'id'
          4        OP_DATA                                                  1
   15     5        INIT_METHOD_CALL                                         !0, 'show'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Class trial:
Function show:
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 = 42) Position 1 = 7
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Z7gg2
function name:  show
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   FETCH_CLASS_CONSTANT                             ~0      'trial', 'sid'
          1      > JMPZ                                                     ~0, ->5
          2    >   FETCH_CLASS_CONSTANT                             ~1      'trial', 'sid'
          3        ECHO                                                     ~1
          4      > JMP                                                      ->7
    9     5    >   FETCH_OBJ_R                                      ~2      'id'
          6        ECHO                                                     ~2
   10     7    > > RETURN                                                   null

End of function show

End of class trial.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.91 ms | 1393 KiB | 13 Q