3v4l.org

run code in 300+ PHP versions simultaneously
<?php class HelloWorld { protected $test; public function __construct($test) { $this->test = $test; } public function getTest() { return $this->test; } } $hello = new HelloWorld(); if (empty($hello->getTest())) { echo "oui"; } else { echo "non"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7ODYG
function name:  (null)
number of ops:  11
compiled vars:  !0 = $hello
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $1      'HelloWorld'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   19     3        INIT_METHOD_CALL                                         !0, 'getTest'
          4        DO_FCALL                                      0  $4      
          5        BOOL_NOT                                         ~5      $4
          6      > JMPZ                                                     ~5, ->9
   20     7    >   ECHO                                                     'oui'
          8      > JMP                                                      ->10
   22     9    >   ECHO                                                     'non'
   23    10    > > RETURN                                                   1

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

End of function __construct

Function gettest:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7ODYG
function name:  getTest
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   FETCH_OBJ_R                                      ~0      'test'
          1      > RETURN                                                   ~0
   15     2*     > RETURN                                                   null

End of function gettest

End of class HelloWorld.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.8 ms | 1394 KiB | 13 Q