3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface czlowiek { function a(); function b(); }; class dupa implements czlowiek{ public function a() {} public function b(){} public $a; public static $NICE = 'STATIC_VALUE'; public function __construct($param) { if(preg_match('/^[bla]+/',$param)){ $this->a = $param; echo '+_construct'.$this->a.self::$NICE; } else { echo 'dupa'; } } public static function statek(){ echo "\nWywolano metode statyczna"; } public function __call($a, $b) { echo "\n".'Wywolano metodÄ™ \''.$a.'\' z parametrami:'."\n"; foreach($b as $i=>$val) { echo 'indeks: '.$i.' wartosc: '.$val."\n"; } } public function setA($a) { $this->a = $a; } }; $a = new dupa('dblabla'); echo $a->a; $b = new dupa(''); echo $b->a; $b->setA('bb'); $b->setb('bb',8,true); echo dupa::$NICE; dupa::statek(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0BdL7
function name:  (null)
number of ops:  26
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   DECLARE_CLASS                                            'dupa'
   36     1        NEW                                              $2      'dupa'
          2        SEND_VAL_EX                                              'dblabla'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
   37     5        FETCH_OBJ_R                                      ~5      !0, 'a'
          6        ECHO                                                     ~5
   38     7        NEW                                              $6      'dupa'
          8        SEND_VAL_EX                                              ''
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !1, $6
   39    11        FETCH_OBJ_R                                      ~9      !1, 'a'
         12        ECHO                                                     ~9
   40    13        INIT_METHOD_CALL                                         !1, 'setA'
         14        SEND_VAL_EX                                              'bb'
         15        DO_FCALL                                      0          
   41    16        INIT_METHOD_CALL                                         !1, 'setb'
         17        SEND_VAL_EX                                              'bb'
         18        SEND_VAL_EX                                              8
         19        SEND_VAL_EX                                              <true>
         20        DO_FCALL                                      0          
   42    21        FETCH_STATIC_PROP_R          unknown             ~12     'NICE'
         22        ECHO                                                     ~12
   43    23        INIT_STATIC_METHOD_CALL                                  'dupa', 'statek'
         24        DO_FCALL                                      0          
   45    25      > RETURN                                                   1

Class czlowiek:
Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0BdL7
function name:  a
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E > > RETURN                                                   null

End of function a

Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0BdL7
function name:  b
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E > > RETURN                                                   null

End of function b

End of class czlowiek.

Class dupa:
Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0BdL7
function name:  a
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   null

End of function a

Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0BdL7
function name:  b
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E > > RETURN                                                   null

End of function b

Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 14
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0BdL7
function name:  __construct
number of ops:  16
compiled vars:  !0 = $param
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%2F%5E%5Bbla%5D%2B%2F'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $1      
          5      > JMPZ                                                     $1, ->14
   14     6    >   ASSIGN_OBJ                                               'a'
          7        OP_DATA                                                  !0
   15     8        FETCH_OBJ_R                                      ~3      'a'
          9        CONCAT                                           ~4      '%2B_construct', ~3
         10        FETCH_STATIC_PROP_R          unknown             ~5      'NICE'
         11        CONCAT                                           ~6      ~4, ~5
         12        ECHO                                                     ~6
         13      > JMP                                                      ->15
   16    14    >   ECHO                                                     'dupa'
   17    15    > > RETURN                                                   null

End of function __construct

Function statek:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0BdL7
function name:  statek
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   ECHO                                                     '%0AWywolano+metode+statyczna'
   22     1      > RETURN                                                   null

End of function statek

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

End of function seta

End of class dupa.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.62 ms | 1404 KiB | 15 Q