3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $hola; public function setHola($name) { echo "I'm called"; $this->hola = $name; } } $a = new A; for($i=0; $i < 100000; $i++) { $a->setHola = 'test'; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 5
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 5
Branch analysis from position: 10
Branch analysis from position: 5
filename:       /in/rEiJt
function name:  (null)
number of ops:  11
compiled vars:  !0 = $a, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $2      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   14     3        ASSIGN                                                   !1, 0
          4      > JMP                                                      ->8
   15     5    >   ASSIGN_OBJ                                               !0, 'setHola'
          6        OP_DATA                                                  'test'
   14     7        PRE_INC                                                  !1
          8    >   IS_SMALLER                                               !1, 100000
          9      > JMPNZ                                                    ~8, ->5
   16    10    > > RETURN                                                   1

Class A:
Function sethola:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rEiJt
function name:  setHola
number of ops:  5
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        ECHO                                                     'I%27m+called'
    8     2        ASSIGN_OBJ                                               'hola'
          3        OP_DATA                                                  !0
    9     4      > RETURN                                                   null

End of function sethola

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
185.8 ms | 1394 KiB | 13 Q