3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Fish { public $common_name; public $flavor; public $record_weight; function __construct($name, $flavor, $record){ $this->common_name = $name; $this->flavor = $flavor; $this->record_weight= $record; } public function getInfo(){ return "A Largemouth Bass is an Excellent flavored fish. The world record weight is 22 pounds 5 ounces." . $this->common_name . $this->flavor . $this->record_weight; } } $bass = new Fish("Largemouth Bass","Excellent","22 pounds 5 ounces"); echo $bass->getInfo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YlGUO
function name:  (null)
number of ops:  10
compiled vars:  !0 = $bass
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   NEW                                              $1      'Fish'
          1        SEND_VAL_EX                                              'Largemouth+Bass'
          2        SEND_VAL_EX                                              'Excellent'
          3        SEND_VAL_EX                                              '22+pounds+5+ounces'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $1
   27     6        INIT_METHOD_CALL                                         !0, 'getInfo'
          7        DO_FCALL                                      0  $4      
          8        ECHO                                                     $4
          9      > RETURN                                                   1

Class Fish:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YlGUO
function name:  __construct
number of ops:  10
compiled vars:  !0 = $name, !1 = $flavor, !2 = $record
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
   12     3        ASSIGN_OBJ                                               'common_name'
          4        OP_DATA                                                  !0
   13     5        ASSIGN_OBJ                                               'flavor'
          6        OP_DATA                                                  !1
   14     7        ASSIGN_OBJ                                               'record_weight'
          8        OP_DATA                                                  !2
   15     9      > RETURN                                                   null

End of function __construct

Function getinfo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YlGUO
function name:  getInfo
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   FETCH_OBJ_R                                      ~0      'common_name'
          1        CONCAT                                           ~1      'A+Largemouth+Bass+is+an+Excellent+flavored+fish.+The+world+record+weight+is+22+pounds+5+ounces.', ~0
   20     2        FETCH_OBJ_R                                      ~2      'flavor'
          3        CONCAT                                           ~3      ~1, ~2
   21     4        FETCH_OBJ_R                                      ~4      'record_weight'
          5        CONCAT                                           ~5      ~3, ~4
          6      > RETURN                                                   ~5
   22     7*     > RETURN                                                   null

End of function getinfo

End of class Fish.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.91 ms | 1395 KiB | 13 Q