3v4l.org

run code in 300+ PHP versions simultaneously
<?php class G { private $s; function ​() { if (!$this->s) { $this->s = 'g'; } if ($a = @func_get_arg(0)) { return$this->s .= $a; } $this->s .= 'o'; return $this; } } function g() { return new G(); } // This is the best that you can do in PHP // because of this: https://wiki.php.net/rfc/uniform_variable_syntax // // PHP supports unicode, unicode supports zero-width spaces echo g()->​()->​()->​()->​('al');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RdNjE
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   31     0  E >   INIT_FCALL                                               'g'
          1        DO_FCALL                                      0  $0      
          2        INIT_METHOD_CALL                                         $0, '%E2%80%8B'
          3        DO_FCALL                                      0  $1      
          4        INIT_METHOD_CALL                                         $1, '%E2%80%8B'
          5        DO_FCALL                                      0  $2      
          6        INIT_METHOD_CALL                                         $2, '%E2%80%8B'
          7        DO_FCALL                                      0  $3      
          8        INIT_METHOD_CALL                                         $3, '%E2%80%8B'
          9        SEND_VAL_EX                                              'al'
         10        DO_FCALL                                      0  $4      
         11        ECHO                                                     $4
         12      > RETURN                                                   1

Function g:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RdNjE
function name:  g
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $0      'G'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
   24     3*     > RETURN                                                   null

End of function g

Class G:
Function %E2%80%8B:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/RdNjE
function name:  ​
number of ops:  20
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   FETCH_OBJ_R                                      ~1      's'
          1        BOOL_NOT                                         ~2      ~1
          2      > JMPZ                                                     ~2, ->5
    9     3    >   ASSIGN_OBJ                                               's'
          4        OP_DATA                                                  'g'
   12     5    >   BEGIN_SILENCE                                    ~4      
          6        INIT_FCALL                                               'func_get_arg'
          7        SEND_VAL                                                 0
          8        DO_ICALL                                         $5      
          9        END_SILENCE                                              ~4
         10        ASSIGN                                           ~6      !0, $5
         11      > JMPZ                                                     ~6, ->15
   13    12    >   ASSIGN_OBJ_OP                                 8  ~7      's'
         13        OP_DATA                                                  !0
         14      > RETURN                                                   ~7
   16    15    >   ASSIGN_OBJ_OP                                 8          's'
         16        OP_DATA                                                  'o'
   17    17        FETCH_THIS                                       ~9      
         18      > RETURN                                                   ~9
   18    19*     > RETURN                                                   null

End of function %E2%80%8B

End of class G.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
187.74 ms | 1394 KiB | 16 Q