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'; } } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gUhIm
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E > > RETURN                                                   1

Class Carro:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gUhIm
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/gUhIm
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:
159.24 ms | 1394 KiB | 13 Q