3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Carro{ public $modelo; public function __construct(){ $modelo = 'Uno'; } public function getModelo(){ return $this->modelo; } public function setModel($modelo){ $this->modelo = $modelo; } public function andar($velocidade = 0){ if($velocidade > 0){ echo "Andando a {$velocidade} km/h..."; }else{ echo 'Estou parado'; } } } $c = new Carro(); echo $c->getModelo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AQb2d
function name:  (null)
number of ops:  7
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   NEW                                              $1      'Carro'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   29     3        INIT_METHOD_CALL                                         !0, 'getModelo'
          4        DO_FCALL                                      0  $4      
          5        ECHO                                                     $4
          6      > RETURN                                                   1

Class Carro:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AQb2d
function name:  __construct
number of ops:  2
compiled vars:  !0 = $modelo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, 'Uno'
    8     1      > RETURN                                                   null

End of function __construct

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

End of function getmodelo

Function setmodel:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AQb2d
function name:  setModel
number of ops:  4
compiled vars:  !0 = $modelo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   15     1        ASSIGN_OBJ                                               'modelo'
          2        OP_DATA                                                  !0
   16     3      > RETURN                                                   null

End of function setmodel

Function andar:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AQb2d
function name:  andar
number of ops:  10
compiled vars:  !0 = $velocidade
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV_INIT                                        !0      0
   19     1        IS_SMALLER                                               0, !0
          2      > JMPZ                                                     ~1, ->8
   20     3    >   ROPE_INIT                                     3  ~3      'Andando+a+'
          4        ROPE_ADD                                      1  ~3      ~3, !0
          5        ROPE_END                                      2  ~2      ~3, '+km%2Fh...'
          6        ECHO                                                     ~2
          7      > JMP                                                      ->9
   22     8    >   ECHO                                                     'Estou+parado'
   24     9    > > RETURN                                                   null

End of function andar

End of class Carro.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
186.6 ms | 1399 KiB | 13 Q