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 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WdMRp
function name:  (null)
number of ops:  12
compiled vars:  !0 = $hello
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $1      'HelloWorld'
          1        SEND_VAL_EX                                              ''
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   19     4        INIT_METHOD_CALL                                         !0, 'getTest'
          5        DO_FCALL                                      0  $4      
          6        BOOL_NOT                                         ~5      $4
          7      > JMPZ                                                     ~5, ->10
   20     8    >   ECHO                                                     'oui'
          9      > JMP                                                      ->11
   22    10    >   ECHO                                                     'non'
   23    11    > > RETURN                                                   1

Class HelloWorld:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WdMRp
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/WdMRp
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:
151.58 ms | 1394 KiB | 13 Q