3v4l.org

run code in 300+ PHP versions simultaneously
<?php $key = '价格'; $doc = []; $doc[$key] = "0"; $value = $doc[$key]; var_dump($doc); if(preg_match('/[0-9]\d*/', $value)) $doc[$key] = floatval($value); else unset($doc[$key]); var_dump($doc);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 18
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vH02m
function name:  (null)
number of ops:  23
compiled vars:  !0 = $key, !1 = $doc, !2 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%E4%BB%B7%E6%A0%BC'
    4     1        ASSIGN                                                   !1, <array>
    5     2        ASSIGN_DIM                                               !1, !0
          3        OP_DATA                                                  '0'
    6     4        FETCH_DIM_R                                      ~6      !1, !0
          5        ASSIGN                                                   !2, ~6
    7     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
    8     9        INIT_FCALL                                               'preg_match'
         10        SEND_VAL                                                 '%2F%5B0-9%5D%5Cd%2A%2F'
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                         $9      
         13      > JMPZ                                                     $9, ->18
         14    >   CAST                                          5  ~11     !2
         15        ASSIGN_DIM                                               !1, !0
         16        OP_DATA                                                  ~11
         17      > JMP                                                      ->19
    9    18    >   UNSET_DIM                                                !1, !0
   11    19    >   INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.37 ms | 940 KiB | 18 Q