3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($a, $b, $c) { $a = $b; $b = $c; $c = $a; return $a + $b + $c; } $a = 1; $b = 2; $c = 3; $b = test($a, $b, $c); $c = test($a, $b, $c); echo $a . " " . $b . " " . $c;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Wdh02
function name:  (null)
number of ops:  21
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                   !0, 1
   11     1        ASSIGN                                                   !1, 2
   12     2        ASSIGN                                                   !2, 3
   14     3        INIT_FCALL                                               'test'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        SEND_VAR                                                 !2
          7        DO_FCALL                                      0  $6      
          8        ASSIGN                                                   !1, $6
   15     9        INIT_FCALL                                               'test'
         10        SEND_VAR                                                 !0
         11        SEND_VAR                                                 !1
         12        SEND_VAR                                                 !2
         13        DO_FCALL                                      0  $8      
         14        ASSIGN                                                   !2, $8
   17    15        CONCAT                                           ~10     !0, '+'
         16        CONCAT                                           ~11     ~10, !1
         17        CONCAT                                           ~12     ~11, '+'
         18        CONCAT                                           ~13     ~12, !2
         19        ECHO                                                     ~13
         20      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Wdh02
function name:  test
number of ops:  10
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
    4     3        ASSIGN                                                   !0, !1
    5     4        ASSIGN                                                   !1, !2
    6     5        ASSIGN                                                   !2, !0
    7     6        ADD                                              ~6      !0, !1
          7        ADD                                              ~7      ~6, !2
          8      > RETURN                                                   ~7
    8     9*     > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
207.77 ms | 1398 KiB | 15 Q