3v4l.org

run code in 300+ PHP versions simultaneously
<?php class PHPApprentice { private static $velocity = ''; private static $initialized = false; public static function __initialize () { if ( self::initialized ) return; self::$initialized = true; } public static function getVelocity () { return self::$velocity; } public static function setVelocity ( $value ) { self::$velocity = $value; } } PHPApprentice::setVelocity ( 'Ludicrous Speed' ); echo PHPApprentice::getVelocity(); //$rafa = (new PHPApprentice ())->setVelocity ( 'jj' ); //echo $rafa->getVelocity ();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SFETF
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   INIT_STATIC_METHOD_CALL                                  'PHPApprentice', 'setVelocity'
          1        SEND_VAL                                                 'Ludicrous+Speed'
          2        DO_FCALL                                      0          
   26     3        INIT_STATIC_METHOD_CALL                                  'PHPApprentice', 'getVelocity'
          4        DO_FCALL                                      0  $1      
          5        ECHO                                                     $1
   28     6      > RETURN                                                   1

Class PHPApprentice:
Function __initialize:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 3
Branch analysis from position: 2
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SFETF
function name:  __initialize
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   FETCH_CLASS_CONSTANT                             ~0      'initialized'
          1      > JMPZ                                                     ~0, ->3
   10     2    > > RETURN                                                   null
   12     3    >   ASSIGN_STATIC_PROP                                       'initialized'
          4        OP_DATA                                                  <true>
   13     5      > RETURN                                                   null

End of function __initialize

Function getvelocity:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SFETF
function name:  getVelocity
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'velocity'
          1      > RETURN                                                   ~0
   18     2*     > RETURN                                                   null

End of function getvelocity

Function setvelocity:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SFETF
function name:  setVelocity
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV                                             !0      
   21     1        ASSIGN_STATIC_PROP                                       'velocity'
          2        OP_DATA                                                  !0
   22     3      > RETURN                                                   null

End of function setvelocity

End of class PHPApprentice.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.81 ms | 1386 KiB | 13 Q