3v4l.org

run code in 300+ PHP versions simultaneously
<?php $num1=5; $num2=10; $action='+'; eval('$res = ' . $num1 . ' ' . $action . ' ' . $num2 . ' ;'); // 5+10 echo $res; //15
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WPNRi
function name:  (null)
number of ops:  12
compiled vars:  !0 = $num1, !1 = $num2, !2 = $action, !3 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 5
    4     1        ASSIGN                                                   !1, 10
    5     2        ASSIGN                                                   !2, '%2B'
    7     3        CONCAT                                           ~7      '%24res+%3D+', !0
          4        CONCAT                                           ~8      ~7, '+'
          5        CONCAT                                           ~9      ~8, !2
          6        CONCAT                                           ~10     ~9, '+'
          7        CONCAT                                           ~11     ~10, !1
          8        CONCAT                                           ~12     ~11, '+%3B'
          9        INCLUDE_OR_EVAL                                          ~12, EVAL
    9    10        ECHO                                                     !3
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.78 ms | 993 KiB | 13 Q