3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = function () { static $x = 0; $x++; return $x;}; $xx = $x(); var_export($xx); var_export($x()); var_export($x());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kgTHl
function name:  (null)
number of ops:  19
compiled vars:  !0 = $x, !1 = $xx
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FkgTHl%3A2%240'
          1        ASSIGN                                                   !0, ~2
    3     2        INIT_DYNAMIC_CALL                                        !0
          3        DO_FCALL                                      0  $4      
          4        ASSIGN                                                   !1, $4
    4     5        INIT_FCALL                                               'var_export'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
    5     8        INIT_FCALL                                               'var_export'
          9        INIT_DYNAMIC_CALL                                        !0
         10        DO_FCALL                                      0  $7      
         11        SEND_VAR                                                 $7
         12        DO_ICALL                                                 
    6    13        INIT_FCALL                                               'var_export'
         14        INIT_DYNAMIC_CALL                                        !0
         15        DO_FCALL                                      0  $9      
         16        SEND_VAR                                                 $9
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FkgTHl%3A2%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kgTHl
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   BIND_STATIC                                              !0
          1        PRE_INC                                                  !0
          2      > RETURN                                                   !0
          3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FkgTHl%3A2%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.68 ms | 1395 KiB | 15 Q