3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass{ public function displayName($name){ this.name->$name; return 'Hello All, I am '.$name; } } $newObj = new MyClass; $newObj->displayName("ashutosh");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IvaYZ
function name:  (null)
number of ops:  7
compiled vars:  !0 = $newObj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $1      'MyClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   10     3        INIT_METHOD_CALL                                         !0, 'displayName'
          4        SEND_VAL_EX                                              'ashutosh'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class MyClass:
Function displayname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IvaYZ
function name:  displayName
number of ops:  9
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        FETCH_CONSTANT                                   ~1      'this'
          2        FETCH_CONSTANT                                   ~2      'name'
          3        FETCH_OBJ_R                                      ~3      ~2, !0
          4        CONCAT                                           ~4      ~1, ~3
          5        FREE                                                     ~4
    5     6        CONCAT                                           ~5      'Hello+All%2C+I+am+', !0
          7      > RETURN                                                   ~5
    6     8*     > RETURN                                                   null

End of function displayname

End of class MyClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.94 ms | 1393 KiB | 13 Q