3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { public $values; public function __construct(array $values) { $this->values = $values; } } $string = '\'\\\'test\\\'\',\'\\\'te\$t2\\\'\',\'\"test3\"\''; $array = eval("[" . $string . "];"); print_r($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k79pi
function name:  (null)
number of ops:  9
compiled vars:  !0 = $string, !1 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ASSIGN                                                   !0, '%27%5C%27test%5C%27%27%2C%27%5C%27te%5C%24t2%5C%27%27%2C%27%5C%22test3%5C%22%27'
   13     1        CONCAT                                           ~3      '%5B', !0
          2        CONCAT                                           ~4      ~3, '%5D%3B'
          3        INCLUDE_OR_EVAL                                  $5      ~4, EVAL
          4        ASSIGN                                                   !1, $5
   14     5        INIT_FCALL                                               'print_r'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Class foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k79pi
function name:  __construct
number of ops:  4
compiled vars:  !0 = $values
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    8     1        ASSIGN_OBJ                                               'values'
          2        OP_DATA                                                  !0
    9     3      > RETURN                                                   null

End of function __construct

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.95 ms | 1386 KiB | 15 Q