3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); function true(){ $true = 'false'; echo "\n", $true,":)"; } class Test { private $data; public function __construct($d){ $this->data = $d; } public function list(){ list($a,$b,$c) = $this->data; echo $a,"\n"; echo $b,"\n"; echo $c,"\n"; return $this; } public function null(){ echo "\nData is ",is_null($this->data)? 'null' : 'not null'; } } $arr = array("a","b","c"); (new Test($arr))->list()->null(); true();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PRpoo
function name:  (null)
number of ops:  14
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 32767
          2        DO_ICALL                                                 
   28     3        ASSIGN                                                   !0, <array>
   29     4        NEW                                              $3      'Test'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
          7        INIT_METHOD_CALL                                         $3, 'list'
          8        DO_FCALL                                      0  $5      
          9        INIT_METHOD_CALL                                         $5, 'null'
         10        DO_FCALL                                      0          
   30    11        INIT_FCALL                                               'true'
         12        DO_FCALL                                      0          
         13      > RETURN                                                   1

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

End of function true

Class Test:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PRpoo
function name:  __construct
number of ops:  4
compiled vars:  !0 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        ASSIGN_OBJ                                               'data'
          2        OP_DATA                                                  !0
   13     3      > RETURN                                                   null

End of function __construct

Function list:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PRpoo
function name:  list
number of ops:  17
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   FETCH_OBJ_R                                      ~3      'data'
          1        FETCH_LIST_R                                     $4      ~3, 0
          2        ASSIGN                                                   !0, $4
          3        FETCH_LIST_R                                     $6      ~3, 1
          4        ASSIGN                                                   !1, $6
          5        FETCH_LIST_R                                     $8      ~3, 2
          6        ASSIGN                                                   !2, $8
          7        FREE                                                     ~3
   17     8        ECHO                                                     !0
          9        ECHO                                                     '%0A'
   18    10        ECHO                                                     !1
         11        ECHO                                                     '%0A'
   19    12        ECHO                                                     !2
         13        ECHO                                                     '%0A'
   20    14        FETCH_THIS                                       ~10     
         15      > RETURN                                                   ~10
   21    16*     > RETURN                                                   null

End of function list

Function null:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
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: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PRpoo
function name:  null
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   ECHO                                                     '%0AData+is+'
          1        FETCH_OBJ_R                                      ~0      'data'
          2        TYPE_CHECK                                    2          ~0
          3      > JMPZ                                                     ~1, ->6
          4    >   QM_ASSIGN                                        ~2      'null'
          5      > JMP                                                      ->7
          6    >   QM_ASSIGN                                        ~2      'not+null'
          7    >   ECHO                                                     ~2
   26     8      > RETURN                                                   null

End of function null

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.69 ms | 1403 KiB | 16 Q