3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Basic{ public function sayHello(){ echo 'Hello world!'; } } trait TraitMethod{ public function sayHello($name){ echo 'Hello! My name is '.$name; } } class TestB extends Basic{ use TraitMethod; public function sayHello($name, $lastname){ echo 'Nazywam siÄ™ '.$name.' '.$lastname; } } $objTestB = new TestB(); $objTestB->sayHello("Nikodem", "Niedowiarek");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rUNVh
function name:  (null)
number of ops:  9
compiled vars:  !0 = $objTestB
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   DECLARE_CLASS                                            'testb', 'basic'
   23     1        NEW                                              $1      'TestB'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   24     4        INIT_METHOD_CALL                                         !0, 'sayHello'
          5        SEND_VAL_EX                                              'Nikodem'
          6        SEND_VAL_EX                                              'Niedowiarek'
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Class Basic:
Function sayhello:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rUNVh
function name:  sayHello
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     'Hello+world%21'
    6     1      > RETURN                                                   null

End of function sayhello

End of class Basic.

Class TraitMethod:
Function sayhello:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rUNVh
function name:  sayHello
number of ops:  4
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        CONCAT                                           ~1      'Hello%21+My+name+is+', !0
          2        ECHO                                                     ~1
   12     3      > RETURN                                                   null

End of function sayhello

End of class TraitMethod.

Class TestB:
Function sayhello:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rUNVh
function name:  sayHello
number of ops:  7
compiled vars:  !0 = $name, !1 = $lastname
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   19     2        CONCAT                                           ~2      'Nazywam+si%C4%99+', !0
          3        CONCAT                                           ~3      ~2, '+'
          4        CONCAT                                           ~4      ~3, !1
          5        ECHO                                                     ~4
   20     6      > RETURN                                                   null

End of function sayhello

End of class TestB.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166 ms | 1395 KiB | 13 Q