3v4l.org

run code in 300+ PHP versions simultaneously
<?php class TestClass { static $_cat; public function setCat($val) { self::$_cat = $val; } public function getCat() { return self::$_cat; } } TestClass::setCat('fluffles'); echo TestClass::$_cat; $testClass = new TestClass(); echo $testClass->getCat();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jR6vV
function name:  (null)
number of ops:  12
compiled vars:  !0 = $testClass
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_STATIC_METHOD_CALL                                  'TestClass', 'setCat'
          1        SEND_VAL                                                 'fluffles'
          2        DO_FCALL                                      0          
   18     3        FETCH_STATIC_PROP_R          unknown             ~2      '_cat'
          4        ECHO                                                     ~2
   20     5        NEW                                              $3      'TestClass'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $3
   22     8        INIT_METHOD_CALL                                         !0, 'getCat'
          9        DO_FCALL                                      0  $6      
         10        ECHO                                                     $6
         11      > RETURN                                                   1

Class TestClass:
Function setcat:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jR6vV
function name:  setCat
number of ops:  4
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        ASSIGN_STATIC_PROP                                       '_cat'
          2        OP_DATA                                                  !0
    8     3      > RETURN                                                   null

End of function setcat

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

End of function getcat

End of class TestClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.7 ms | 1394 KiB | 13 Q