3v4l.org

run code in 300+ PHP versions simultaneously
<?php function myFunction($arg1 = '', $arg2 = '') { return 'My args: ' . $arg1 . ' & ' . $arg2; } $arg1 = "foo"; $arg2 = null; $result = myFunction($arg1, $arg2); var_dump($result === 'My args: ' . $arg1 . ' & ' . $arg2); $arg1 = "foo"; $arg2 = "bar"; $result = myFunction($arg1, $arg2); var_dump($result === 'My args: ' . $arg1 . ' & ' . $arg2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7aL4O
function name:  (null)
number of ops:  29
compiled vars:  !0 = $arg1, !1 = $arg2, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, 'foo'
    7     1        ASSIGN                                                   !1, null
    8     2        INIT_FCALL                                               'myfunction'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_FCALL                                      0  $5      
          6        ASSIGN                                                   !2, $5
    9     7        INIT_FCALL                                               'var_dump'
          8        CONCAT                                           ~7      'My+args%3A+', !0
          9        CONCAT                                           ~8      ~7, '+%26+'
         10        CONCAT                                           ~9      ~8, !1
         11        IS_IDENTICAL                                     ~10     !2, ~9
         12        SEND_VAL                                                 ~10
         13        DO_ICALL                                                 
   11    14        ASSIGN                                                   !0, 'foo'
   12    15        ASSIGN                                                   !1, 'bar'
   13    16        INIT_FCALL                                               'myfunction'
         17        SEND_VAR                                                 !0
         18        SEND_VAR                                                 !1
         19        DO_FCALL                                      0  $14     
         20        ASSIGN                                                   !2, $14
   14    21        INIT_FCALL                                               'var_dump'
         22        CONCAT                                           ~16     'My+args%3A+', !0
         23        CONCAT                                           ~17     ~16, '+%26+'
         24        CONCAT                                           ~18     ~17, !1
         25        IS_IDENTICAL                                     ~19     !2, ~18
         26        SEND_VAL                                                 ~19
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Function myfunction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7aL4O
function name:  myFunction
number of ops:  7
compiled vars:  !0 = $arg1, !1 = $arg2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV_INIT                                        !0      ''
          1        RECV_INIT                                        !1      ''
    3     2        CONCAT                                           ~2      'My+args%3A+', !0
          3        CONCAT                                           ~3      ~2, '+%26+'
          4        CONCAT                                           ~4      ~3, !1
          5      > RETURN                                                   ~4
    4     6*     > RETURN                                                   null

End of function myfunction

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.53 ms | 1399 KiB | 17 Q