3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "Strings representing numbers automatically turned into numbers".php_eol; $numbers = array('+123123', '-123123', '1.2e3', '0.00001'); var_dump( $numbers, json_encode($numbers, JSON_NUMERIC_CHECK) ); echo "Strings containing improperly formatted numbers".PHP_EOL; $strings = array('+a33123456789', 'a123'); var_dump( $strings, json_encode($strings, JSON_NUMERIC_CHECK) ); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hKn3q
function name:  (null)
number of ops:  23
compiled vars:  !0 = $numbers, !1 = $strings
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   FETCH_CONSTANT                                   ~2      'php_eol'
          1        CONCAT                                           ~3      'Strings+representing+numbers+automatically+turned+into+numbers', ~2
          2        ECHO                                                     ~3
    3     3        ASSIGN                                                   !0, <array>
    4     4        INIT_FCALL                                               'var_dump'
    5     5        SEND_VAR                                                 !0
    6     6        INIT_FCALL                                               'json_encode'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 32
          9        DO_ICALL                                         $5      
         10        SEND_VAR                                                 $5
         11        DO_ICALL                                                 
    8    12        ECHO                                                     'Strings+containing+improperly+formatted+numbers%0A'
    9    13        ASSIGN                                                   !1, <array>
   10    14        INIT_FCALL                                               'var_dump'
   11    15        SEND_VAR                                                 !1
   12    16        INIT_FCALL                                               'json_encode'
         17        SEND_VAR                                                 !1
         18        SEND_VAL                                                 32
         19        DO_ICALL                                         $8      
         20        SEND_VAR                                                 $8
         21        DO_ICALL                                                 
   14    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.72 ms | 1395 KiB | 17 Q