3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = [ "€1000", "€66.66", "€-5.0005", ]; $result = []; foreach ($tests as $t) { sscanf($t, '€%d', $result["$t: asInteger"]); sscanf($t, '€%f', $result["$t: asFloat"]); } var_dump($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 21
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 21
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/O8bae
function name:  (null)
number of ops:  26
compiled vars:  !0 = $tests, !1 = $result, !2 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        ASSIGN                                                   !1, <array>
   10     2      > FE_RESET_R                                       $5      !0, ->21
          3    > > FE_FETCH_R                                               $5, !2, ->21
   11     4    >   INIT_FCALL                                               'sscanf'
          5        SEND_VAR                                                 !2
          6        SEND_VAL                                                 '%E2%82%AC%25d'
          7        NOP                                                      
          8        FAST_CONCAT                                      ~6      !2, '%3A+asInteger'
          9        FETCH_DIM_W                                      $7      !1, ~6
         10        SEND_REF                                                 $7
         11        DO_ICALL                                                 
   12    12        INIT_FCALL                                               'sscanf'
         13        SEND_VAR                                                 !2
         14        SEND_VAL                                                 '%E2%82%AC%25f'
         15        NOP                                                      
         16        FAST_CONCAT                                      ~9      !2, '%3A+asFloat'
         17        FETCH_DIM_W                                      $10     !1, ~9
         18        SEND_REF                                                 $10
         19        DO_ICALL                                                 
   10    20      > JMP                                                      ->3
         21    >   FE_FREE                                                  $5
   14    22        INIT_FCALL                                               'var_dump'
         23        SEND_VAR                                                 !1
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.82 ms | 1011 KiB | 15 Q