3v4l.org

run code in 300+ PHP versions simultaneously
<?php class asdf { const DUPA = array('hehe' => 'asdf'); public function foo() { isset(self::DUPA['asdf']) ? $m = 'tak' : $m = "nie"; echo $m; } } (new asdf)->foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YQZOF
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $0      'asdf'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $0, 'foo'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Class asdf:
Function foo:
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/YQZOF
function name:  foo
number of ops:  10
compiled vars:  !0 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ISSET_ISEMPTY_DIM_OBJ                         0          <array>, 'asdf'
          1      > JMPZ                                                     ~1, ->5
          2    >   ASSIGN                                           ~2      !0, 'tak'
          3        QM_ASSIGN                                        ~3      ~2
          4      > JMP                                                      ->7
          5    >   ASSIGN                                           ~4      !0, 'nie'
          6        QM_ASSIGN                                        ~3      ~4
          7    >   FREE                                                     ~3
    9     8        ECHO                                                     !0
   10     9      > RETURN                                                   null

End of function foo

End of class asdf.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.47 ms | 1385 KiB | 13 Q