3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { function bar() { echo "this is " . (!empty($this) && !is_null($this) ? 'not ' : '') . "null\n"; } } foo::bar(); (new foo)->bar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pBuQd
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_STATIC_METHOD_CALL                                  'foo', 'bar'
          1        DO_FCALL                                      0          
    9     2        NEW                                              $1      'foo'
          3        DO_FCALL                                      0          
          4        INIT_METHOD_CALL                                         $1, 'bar'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class foo:
Function bar:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
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
Branch analysis from position: 7
filename:       /in/pBuQd
function name:  bar
number of ops:  15
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ISSET_ISEMPTY_THIS                               ~0      
          1        BOOL_NOT                                         ~1      ~0
          2      > JMPZ_EX                                          ~1      ~1, ->7
          3    >   FETCH_THIS                                       ~2      
          4        TYPE_CHECK                                    2  ~3      ~2
          5        BOOL_NOT                                         ~4      ~3
          6        BOOL                                             ~1      ~4
          7    > > JMPZ                                                     ~1, ->10
          8    >   QM_ASSIGN                                        ~5      'not+'
          9      > JMP                                                      ->11
         10    >   QM_ASSIGN                                        ~5      ''
         11    >   CONCAT                                           ~6      'this+is+', ~5
         12        CONCAT                                           ~7      ~6, 'null%0A'
         13        ECHO                                                     ~7
    5    14      > RETURN                                                   null

End of function bar

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
191.97 ms | 1394 KiB | 13 Q