3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Enter your code here, enjoy! class Cat { public $isAlive = true; public $numLegs = 4; public $name; public function __construct($name) { return $this->name=$name; } public function meow() { return "Meow meow"; } } $name = new Cat("Cat Code"); echo $name->name; echo " / "; echo $name->meow();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gos5e
function name:  (null)
number of ops:  11
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'Cat'
          1        SEND_VAL_EX                                              'Cat+Code'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   20     4        FETCH_OBJ_R                                      ~4      !0, 'name'
          5        ECHO                                                     ~4
   21     6        ECHO                                                     '+%2F+'
   22     7        INIT_METHOD_CALL                                         !0, 'meow'
          8        DO_FCALL                                      0  $5      
          9        ECHO                                                     $5
         10      > RETURN                                                   1

Class Cat:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gos5e
function name:  __construct
number of ops:  5
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        ASSIGN_OBJ                                       ~1      'name'
          2        OP_DATA                                                  !0
          3      > RETURN                                                   ~1
   13     4*     > RETURN                                                   null

End of function __construct

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

End of function meow

End of class Cat.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.53 ms | 1394 KiB | 13 Q