3v4l.org

run code in 300+ PHP versions simultaneously
<?php class UAF { protected $intent; public static function String($a) { return new static($a); } public function setIntent($b) { $this->intent = $b; return $this; } } (new UAF())->setIntent('test'); (UAF::String('test'))->setIntent('test');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uihQk
function name:  (null)
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $0      'UAF'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $0, 'setIntent'
          3        SEND_VAL_EX                                              'test'
          4        DO_FCALL                                      0          
   19     5        INIT_STATIC_METHOD_CALL                                  'UAF', 'String'
          6        SEND_VAL                                                 'test'
          7        DO_FCALL                                      0  $3      
          8        INIT_METHOD_CALL                                         $3, 'setIntent'
          9        SEND_VAL_EX                                              'test'
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

Class UAF:
Function string:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uihQk
function name:  String
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        NEW                          static              $1      
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4      > RETURN                                                   $1
    8     5*     > RETURN                                                   null

End of function string

Function setintent:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uihQk
function name:  setIntent
number of ops:  6
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        ASSIGN_OBJ                                               'intent'
          2        OP_DATA                                                  !0
   13     3        FETCH_THIS                                       ~2      
          4      > RETURN                                                   ~2
   14     5*     > RETURN                                                   null

End of function setintent

End of class UAF.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.59 ms | 1395 KiB | 13 Q