3v4l.org

run code in 300+ PHP versions simultaneously
<?php // 車クラスを作成 class Car { private $km = 0; public function drive($distance) { $this->km += $distance; } public function getKm() { return $this->km; } } // インスタンス化して変数priusに代入 $prius = new Car(); // インスタンス化して変数corollaに代入 $corolla = new Car(); // $prius->drive(80); // $prius->drive(20); print $prius->getKm();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GnstY
function name:  (null)
number of ops:  16
compiled vars:  !0 = $prius, !1 = $corolla
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $2      'Car'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   21     3        NEW                                              $5      'Car'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   24     6        INIT_METHOD_CALL                                         !0, 'drive'
          7        SEND_VAL_EX                                              80
          8        DO_FCALL                                      0          
   27     9        INIT_METHOD_CALL                                         !0, 'drive'
         10        SEND_VAL_EX                                              20
         11        DO_FCALL                                      0          
   29    12        INIT_METHOD_CALL                                         !0, 'getKm'
         13        DO_FCALL                                      0  $10     
         14        ECHO                                                     $10
         15      > RETURN                                                   1

Class Car:
Function drive:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GnstY
function name:  drive
number of ops:  4
compiled vars:  !0 = $distance
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        ASSIGN_OBJ_OP                                 1          'km'
          2        OP_DATA                                                  !0
   10     3      > RETURN                                                   null

End of function drive

Function getkm:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GnstY
function name:  getKm
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   FETCH_OBJ_R                                      ~0      'km'
          1      > RETURN                                                   ~0
   14     2*     > RETURN                                                   null

End of function getkm

End of class Car.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.26 ms | 1399 KiB | 13 Q