3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $arr = array("test"); function bar( $str ){ var_dump($this->arr[0]); var_dump(is_callable(self."::".$this->arr[0])); self::{$this->arr[0]}( $str ); } static function test($var) { echo "Testing: $var\n"; } } (new Foo)->bar("bla");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bORlN
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $0      'Foo'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $0, 'bar'
          3        SEND_VAL_EX                                              'bla'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bORlN
function name:  bar
number of ops:  23
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        INIT_FCALL                                               'var_dump'
          2        FETCH_OBJ_R                                      ~1      'arr'
          3        FETCH_DIM_R                                      ~2      ~1, 0
          4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
    8     6        INIT_FCALL                                               'var_dump'
          7        INIT_FCALL                                               'is_callable'
          8        FETCH_CONSTANT                                   ~4      'self'
          9        CONCAT                                           ~5      ~4, '%3A%3A'
         10        FETCH_OBJ_R                                      ~6      'arr'
         11        FETCH_DIM_R                                      ~7      ~6, 0
         12        CONCAT                                           ~8      ~5, ~7
         13        SEND_VAL                                                 ~8
         14        DO_ICALL                                         $9      
         15        SEND_VAR                                                 $9
         16        DO_ICALL                                                 
    9    17        FETCH_OBJ_R                                      ~11     'arr'
         18        FETCH_DIM_R                                      ~12     ~11, 0
         19        INIT_STATIC_METHOD_CALL                                  ~12
         20        SEND_VAR_EX                                              !0
         21        DO_FCALL                                      0          
   10    22      > RETURN                                                   null

End of function bar

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bORlN
function name:  test
number of ops:  6
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        ROPE_INIT                                     3  ~2      'Testing%3A+'
          2        ROPE_ADD                                      1  ~2      ~2, !0
          3        ROPE_END                                      2  ~1      ~2, '%0A'
          4        ECHO                                                     ~1
   14     5      > RETURN                                                   null

End of function test

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.73 ms | 1401 KiB | 17 Q