3v4l.org

run code in 300+ PHP versions simultaneously
<?php $msg=$_GET['msg']??"no msg!"; file_put_contents('msg.log.txt',$msg."\r\n",FILE_APPEND|LOCK_EX); $matches=NULL; $isMatch=preg_match("/\d+\s*(?:\+|\-|\*|\/|\:)\s*\d+/",$msg,$matches); if($isMatch){ $matches[0]=strtr($matches[0],array(':'=>'/')); //var_dump($matches) & die(); $res=eval("return (".$matches[0].");"); // var_dump($res); echo "!check {$res}"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 34
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
filename:       /in/BvG1l
function name:  (null)
number of ops:  35
compiled vars:  !0 = $msg, !1 = $matches, !2 = $isMatch, !3 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   FETCH_IS                                         ~4      '_GET'
          1        FETCH_DIM_IS                                     ~5      ~4, 'msg'
          2        COALESCE                                         ~6      ~5
          3        QM_ASSIGN                                        ~6      'no+msg%21'
          4        ASSIGN                                                   !0, ~6
    3     5        INIT_FCALL                                               'file_put_contents'
          6        SEND_VAL                                                 'msg.log.txt'
          7        CONCAT                                           ~8      !0, '%0D%0A'
          8        SEND_VAL                                                 ~8
          9        SEND_VAL                                                 10
         10        DO_ICALL                                                 
    4    11        ASSIGN                                                   !1, null
    5    12        INIT_FCALL                                               'preg_match'
         13        SEND_VAL                                                 '%2F%5Cd%2B%5Cs%2A%28%3F%3A%5C%2B%7C%5C-%7C%5C%2A%7C%5C%2F%7C%5C%3A%29%5Cs%2A%5Cd%2B%2F'
         14        SEND_VAR                                                 !0
         15        SEND_REF                                                 !1
         16        DO_ICALL                                         $11     
         17        ASSIGN                                                   !2, $11
    6    18      > JMPZ                                                     !2, ->34
    7    19    >   INIT_FCALL                                               'strtr'
         20        FETCH_DIM_R                                      ~14     !1, 0
         21        SEND_VAL                                                 ~14
         22        SEND_VAL                                                 <array>
         23        DO_ICALL                                         $15     
         24        ASSIGN_DIM                                               !1, 0
         25        OP_DATA                                                  $15
    9    26        FETCH_DIM_R                                      ~16     !1, 0
         27        CONCAT                                           ~17     'return+%28', ~16
         28        CONCAT                                           ~18     ~17, '%29%3B'
         29        INCLUDE_OR_EVAL                                  $19     ~18, EVAL
         30        ASSIGN                                                   !3, $19
   11    31        NOP                                                      
         32        FAST_CONCAT                                      ~21     '%21check+', !3
         33        ECHO                                                     ~21
   12    34    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.85 ms | 1396 KiB | 19 Q