3v4l.org

run code in 500+ PHP versions simultaneously
<?php declare(strict_types=1); class Pont { public static int $nombrePietons = 0; public function nouveauPieton() { self::$nombrePietons++; } } $pontLondres = new Pont; $pontLondres->nouveauPieton(); $pontManhattan = new Pont; $pontManhattan->nouveauPieton(); echo Pont::$nombrePietons;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sLgR9
function name:  (null)
number of ops:  13
compiled vars:  !0 = $pontLondres, !1 = $pontManhattan
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   15     0  E >   NEW                                                  $2      'Pont'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $2
   16     3        INIT_METHOD_CALL                                             !0, 'nouveauPieton'
          4        DO_FCALL                                          0          
   18     5        NEW                                                  $6      'Pont'
          6        DO_FCALL                                          0          
          7        ASSIGN                                                       !1, $6
   19     8        INIT_METHOD_CALL                                             !1, 'nouveauPieton'
          9        DO_FCALL                                          0          
   21    10        FETCH_STATIC_PROP_R              unknown             ~10     'nombrePietons'
         11        ECHO                                                         ~10
   22    12      > RETURN                                                       1

Class Pont:
Function nouveaupieton:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sLgR9
function name:  nouveauPieton
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   PRE_INC_STATIC_PROP                                          'nombrePietons'
   12     1      > RETURN                                                       null

End of function nouveaupieton

End of class Pont.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
191.97 ms | 1996 KiB | 13 Q