3v4l.org

run code in 300+ PHP versions simultaneously
<?php $name = 'aresa'; $value = 'someValue'; $user_id = 'someID'; echo '1-->'; var_dump("\n[start]" . time() . "|$name|$value|$user_id" . '[end]'); // this derefers $user_id somehow (end it probably evaled to false (which is 0) so $user_id[0] echo '2-->'; var_dump(PHP_EOL . '[start]' . time() . '|' . $name . '|' . $value . '|' . $user_id . '[end]'); class Foo { public function bar($name = '', $value = '', $user_id = '') { $inputString = "\n[start]" . time() . "|$name|$value|$user_id" . '[end]'; echo '3-->'; var_dump($inputString); } } $x = new Foo; $x->bar($name, $value, $user_id);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NhCiP
function name:  (null)
number of ops:  41
compiled vars:  !0 = $name, !1 = $value, !2 = $user_id, !3 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'aresa'
    3     1        ASSIGN                                                   !1, 'someValue'
    4     2        ASSIGN                                                   !2, 'someID'
    5     3        ECHO                                                     '1--%3E'
    6     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'time'
          6        DO_ICALL                                         $7      
          7        CONCAT                                           ~8      '%0A%5Bstart%5D', $7
          8        ROPE_INIT                                     6  ~10     '%7C'
          9        ROPE_ADD                                      1  ~10     ~10, !0
         10        ROPE_ADD                                      2  ~10     ~10, '%7C'
         11        ROPE_ADD                                      3  ~10     ~10, !1
         12        ROPE_ADD                                      4  ~10     ~10, '%7C'
         13        ROPE_END                                      5  ~9      ~10, !2
         14        CONCAT                                           ~13     ~8, ~9
         15        CONCAT                                           ~14     ~13, '%5Bend%5D'
         16        SEND_VAL                                                 ~14
         17        DO_ICALL                                                 
    7    18        ECHO                                                     '2--%3E'
    8    19        INIT_FCALL                                               'var_dump'
         20        INIT_FCALL                                               'time'
         21        DO_ICALL                                         $16     
         22        CONCAT                                           ~17     '%0A%5Bstart%5D', $16
         23        CONCAT                                           ~18     ~17, '%7C'
         24        CONCAT                                           ~19     ~18, !0
         25        CONCAT                                           ~20     ~19, '%7C'
         26        CONCAT                                           ~21     ~20, !1
         27        CONCAT                                           ~22     ~21, '%7C'
         28        CONCAT                                           ~23     ~22, !2
         29        CONCAT                                           ~24     ~23, '%5Bend%5D'
         30        SEND_VAL                                                 ~24
         31        DO_ICALL                                                 
   17    32        NEW                                              $26     'Foo'
         33        DO_FCALL                                      0          
         34        ASSIGN                                                   !3, $26
   18    35        INIT_METHOD_CALL                                         !3, 'bar'
         36        SEND_VAR_EX                                              !0
         37        SEND_VAR_EX                                              !1
         38        SEND_VAR_EX                                              !2
         39        DO_FCALL                                      0          
         40      > RETURN                                                   1

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NhCiP
function name:  bar
number of ops:  20
compiled vars:  !0 = $name, !1 = $value, !2 = $user_id, !3 = $inputString
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV_INIT                                        !0      ''
          1        RECV_INIT                                        !1      ''
          2        RECV_INIT                                        !2      ''
   12     3        INIT_FCALL                                               'time'
          4        DO_ICALL                                         $4      
          5        CONCAT                                           ~5      '%0A%5Bstart%5D', $4
          6        ROPE_INIT                                     6  ~7      '%7C'
          7        ROPE_ADD                                      1  ~7      ~7, !0
          8        ROPE_ADD                                      2  ~7      ~7, '%7C'
          9        ROPE_ADD                                      3  ~7      ~7, !1
         10        ROPE_ADD                                      4  ~7      ~7, '%7C'
         11        ROPE_END                                      5  ~6      ~7, !2
         12        CONCAT                                           ~10     ~5, ~6
         13        CONCAT                                           ~11     ~10, '%5Bend%5D'
         14        ASSIGN                                                   !3, ~11
   13    15        ECHO                                                     '3--%3E'
   14    16        INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !3
         18        DO_ICALL                                                 
   15    19      > RETURN                                                   null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.26 ms | 1392 KiB | 17 Q