3v4l.org

run code in 300+ PHP versions simultaneously
<?php class dupa { public $a = 'j'; public static $NICE = 'STATIC_VALUE'; public function __construct($param) { $this->a = $param; echo '+_construct'.$this->a.self::$NICE; } public function __call($a, $b) { echo 'Wywolano metodÄ™ '.$a.' z parametrami:'; foreach($b as $i=>$val) { echo 'indeks: '.$i.'wartosc: '.$val; } } public function setA($a) { $this->a = $a; } }; $a = new dupa('blabla'); echo $a->a; $b = new dupa(''); echo $b->a; $b->setA('bb'); $b->setb('bb') ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gNttn
function name:  (null)
number of ops:  19
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   NEW                                              $2      'dupa'
          1        SEND_VAL_EX                                              'blabla'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   25     4        FETCH_OBJ_R                                      ~5      !0, 'a'
          5        ECHO                                                     ~5
   26     6        NEW                                              $6      'dupa'
          7        SEND_VAL_EX                                              ''
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $6
   27    10        FETCH_OBJ_R                                      ~9      !1, 'a'
         11        ECHO                                                     ~9
   28    12        INIT_METHOD_CALL                                         !1, 'setA'
         13        SEND_VAL_EX                                              'bb'
         14        DO_FCALL                                      0          
   29    15        INIT_METHOD_CALL                                         !1, 'setb'
         16        SEND_VAL_EX                                              'bb'
         17        DO_FCALL                                      0          
   30    18      > RETURN                                                   1

Class dupa:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gNttn
function name:  __construct
number of ops:  9
compiled vars:  !0 = $param
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        ASSIGN_OBJ                                               'a'
          2        OP_DATA                                                  !0
    9     3        FETCH_OBJ_R                                      ~2      'a'
          4        CONCAT                                           ~3      '%2B_construct', ~2
          5        FETCH_STATIC_PROP_R          unknown             ~4      'NICE'
          6        CONCAT                                           ~5      ~3, ~4
          7        ECHO                                                     ~5
   10     8      > RETURN                                                   null

End of function __construct

Function __call:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 13
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/gNttn
function name:  __call
number of ops:  15
compiled vars:  !0 = $a, !1 = $b, !2 = $val, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   12     2        CONCAT                                           ~4      'Wywolano+metod%C4%99+', !0
          3        CONCAT                                           ~5      ~4, '+z+parametrami%3A'
          4        ECHO                                                     ~5
   13     5      > FE_RESET_R                                       $6      !1, ->13
          6    > > FE_FETCH_R                                       ~7      $6, !2, ->13
          7    >   ASSIGN                                                   !3, ~7
   15     8        CONCAT                                           ~9      'indeks%3A+', !3
          9        CONCAT                                           ~10     ~9, 'wartosc%3A+'
         10        CONCAT                                           ~11     ~10, !2
         11        ECHO                                                     ~11
   13    12      > JMP                                                      ->6
         13    >   FE_FREE                                                  $6
   17    14      > RETURN                                                   null

End of function __call

Function seta:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gNttn
function name:  setA
number of ops:  4
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV                                             !0      
   20     1        ASSIGN_OBJ                                               'a'
          2        OP_DATA                                                  !0
   21     3      > RETURN                                                   null

End of function seta

End of class dupa.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.76 ms | 1399 KiB | 13 Q