3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Carro{ public $modelo; function __construct(){ $modelo = 'Uno'; } function andar($velocidade = 0){ if($velocidade > 0){ echo "Andando a {$velocidade} km/h..."; }else{ echo 'Estou parado'; } } } $c = new Carro(); $c->andar(50);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gD57h
function name:  (null)
number of ops:  7
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   NEW                                              $1      'Carro'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   21     3        INIT_METHOD_CALL                                         !0, 'andar'
          4        SEND_VAL_EX                                              50
          5        DO_FCALL                                      0          
          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/gD57h
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 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/gD57h
function name:  andar
number of ops:  10
compiled vars:  !0 = $velocidade
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV_INIT                                        !0      0
   11     1        IS_SMALLER                                               0, !0
          2      > JMPZ                                                     ~1, ->8
   12     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
   14     8    >   ECHO                                                     'Estou+parado'
   16     9    > > RETURN                                                   null

End of function andar

End of class Carro.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.55 ms | 1394 KiB | 13 Q