3v4l.org

run code in 300+ PHP versions simultaneously
<?php const A = 1; const B = A * 2; class NuovoRisultato { const C = B + 1; const CALCOLO = A / self::C; const OUTPUT = 'Valore di C pari a '.self::C; public function addizione($totale = A + self::C) { return $totale; } } echo (new C)->addizione()."\n"; echo C::OUTPUT; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lDc5V
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_CONST                                            'A', 1
    3     1        DECLARE_CONST                                            'B', <const ast>
   15     2        NEW                                              $0      'C'
          3        DO_FCALL                                      0          
          4        INIT_METHOD_CALL                                         $0, 'addizione'
          5        DO_FCALL                                      0  $2      
          6        CONCAT                                           ~3      $2, '%0A'
          7        ECHO                                                     ~3
   16     8        FETCH_CLASS_CONSTANT                             ~4      'C', 'OUTPUT'
          9        ECHO                                                     ~4
   17    10      > RETURN                                                   1

Class NuovoRisultato:
Function addizione:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lDc5V
function name:  addizione
number of ops:  3
compiled vars:  !0 = $totale
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV_INIT                                        !0      <const ast>
   11     1      > RETURN                                                   !0
   12     2*     > RETURN                                                   null

End of function addizione

End of class NuovoRisultato.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.51 ms | 1384 KiB | 13 Q