3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f(){} f(print "Jack\n"); $a=null; f(print ++$a . "\n"); print strlen(4) . "\n"; class C { function C(){} } new C(print ++$a); $a = 10; echo "\nCount: ",count($a),"\n"; $n=NULL; $nn = $n; --$nn; $n++; var_dump($nn,$n); $s = "mehea"; $s++; var_dump($s); $s--; var_dump($s); class A { } class B extends A { public function __construct() { // make sure parent constructor gets called if someone adds one parent::__construct(); } } new B();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bTsZK
function name:  (null)
number of ops:  46
compiled vars:  !0 = $a, !1 = $n, !2 = $nn, !3 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'f'
          1        ECHO                                                     'Jack%0A'
          2        SEND_VAL                                                 1
          3        DO_FCALL                                      0          
    4     4        ASSIGN                                                   !0, null
    5     5        INIT_FCALL                                               'f'
          6        PRE_INC                                          ~6      !0
          7        CONCAT                                           ~7      ~6, '%0A'
          8        ECHO                                                     ~7
          9        SEND_VAL                                                 1
         10        DO_FCALL                                      0          
    6    11        STRLEN                                           ~9      4
         12        CONCAT                                           ~10     ~9, '%0A'
         13        ECHO                                                     ~10
   11    14        NEW                                              $11     'C'
         15        PRE_INC                                          ~12     !0
         16        ECHO                                                     ~12
         17        SEND_VAL_EX                                              1
         18        DO_FCALL                                      0          
         19        FREE                                                     $11
   12    20        ASSIGN                                                   !0, 10
   13    21        ECHO                                                     '%0ACount%3A+'
         22        COUNT                                            ~15     !0
         23        ECHO                                                     ~15
         24        ECHO                                                     '%0A'
   14    25        ASSIGN                                                   !1, null
   15    26        ASSIGN                                                   !2, !1
   16    27        PRE_DEC                                                  !2
   17    28        PRE_INC                                                  !1
   18    29        INIT_FCALL                                               'var_dump'
         30        SEND_VAR                                                 !2
         31        SEND_VAR                                                 !1
         32        DO_ICALL                                                 
   19    33        ASSIGN                                                   !3, 'mehea'
   20    34        PRE_INC                                                  !3
   21    35        INIT_FCALL                                               'var_dump'
         36        SEND_VAR                                                 !3
         37        DO_ICALL                                                 
   22    38        PRE_DEC                                                  !3
   23    39        INIT_FCALL                                               'var_dump'
         40        SEND_VAR                                                 !3
         41        DO_ICALL                                                 
   35    42        NEW                                              $26     'B'
         43        DO_FCALL                                      0          
         44        FREE                                                     $26
         45      > RETURN                                                   1

Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bTsZK
function name:  f
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E > > RETURN                                                   null

End of function f

Class C:
Function c:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bTsZK
function name:  C
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E > > RETURN                                                   null

End of function c

End of class C.

Class A: [no user functions]
Class B:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bTsZK
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   31     0  E >   INIT_STATIC_METHOD_CALL                                  
          1        DO_FCALL                                      0          
   32     2      > RETURN                                                   null

End of function __construct

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.55 ms | 1403 KiB | 17 Q