3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = new test(); $test->setSuperSecret(); $test->exploitableExpression(); class test { private $mySuperSecretVariable; public function exploitableExpression() { $arg= '1234$this->mySuperSecretVariable'; preg_replace("/([0-9]+)(.+)/e",'list($var,$var2)=array("$1","$2")',$arg); var_dump($var,$var2); } public function setSuperSecret() { $this->mySuperSecretVariable = 'SECRET!'; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nolQu
function name:  (null)
number of ops:  8
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $1      'test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    3     3        INIT_METHOD_CALL                                         !0, 'setSuperSecret'
          4        DO_FCALL                                      0          
    4     5        INIT_METHOD_CALL                                         !0, 'exploitableExpression'
          6        DO_FCALL                                      0          
   19     7      > RETURN                                                   1

Class test:
Function exploitableexpression:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nolQu
function name:  exploitableExpression
number of ops:  11
compiled vars:  !0 = $arg, !1 = $var, !2 = $var2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN                                                   !0, '1234%24this-%3EmySuperSecretVariable'
   12     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%28%5B0-9%5D%2B%29%28.%2B%29%2Fe'
          3        SEND_VAL                                                 'list%28%24var%2C%24var2%29%3Darray%28%22%241%22%2C%22%242%22%29'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
   13     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !1
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                                 
   14    10      > RETURN                                                   null

End of function exploitableexpression

Function setsupersecret:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nolQu
function name:  setSuperSecret
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   ASSIGN_OBJ                                               'mySuperSecretVariable'
          1        OP_DATA                                                  'SECRET%21'
   18     2      > RETURN                                                   null

End of function setsupersecret

End of class test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.63 ms | 1396 KiB | 17 Q