3v4l.org

run code in 500+ PHP versions simultaneously
<?php foreach ([1.1, NAN, INF] as $f) { echo "--- ", var_export($f, true), PHP_EOL; echo 'string: ', (string) $f, PHP_EOL; echo 'int: ', (int) $f, PHP_EOL; var_dump(json_encode($f), json_last_error_msg()); echo 'sprintf: ', sprintf('%f %d %s', $f, $f, $f), PHP_EOL; echo 'number_format: ', number_format($f), PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 1, Position 2 = 42
Branch analysis from position: 1
2 jumps found. (Code = 78) Position 1 = 2, Position 2 = 42
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 1
Branch analysis from position: 1
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 42
filename:       /in/TPOsd
function name:  (null)
number of ops:  44
compiled vars:  !0 = $f
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E > > FE_RESET_R                                           $1      <array>, ->42
          1    > > FE_FETCH_R                                                   $1, !0, ->42
    4     2    >   ECHO                                                         '---+'
          3        INIT_FCALL                                                   'var_export'
          4        SEND_VAR                                                     !0
          5        SEND_VAL                                                     <true>
          6        DO_ICALL                                             $2      
          7        ECHO                                                         $2
          8        ECHO                                                         '%0A'
    5     9        ECHO                                                         'string%3A+'
         10        CAST                                              6  ~3      !0
         11        ECHO                                                         ~3
         12        ECHO                                                         '%0A'
    6    13        ECHO                                                         'int%3A+'
         14        CAST                                              4  ~4      !0
         15        ECHO                                                         ~4
         16        ECHO                                                         '%0A'
    7    17        INIT_FCALL                                                   'var_dump'
         18        INIT_FCALL                                                   'json_encode'
         19        SEND_VAR                                                     !0
         20        DO_ICALL                                             $5      
         21        SEND_VAR                                                     $5
         22        INIT_FCALL                                                   'json_last_error_msg'
         23        DO_ICALL                                             $6      
         24        SEND_VAR                                                     $6
         25        DO_ICALL                                                     
    8    26        ECHO                                                         'sprintf%3A+'
         27        INIT_FCALL                                                   'sprintf'
         28        SEND_VAL                                                     '%25f+%25d+%25s'
         29        SEND_VAR                                                     !0
         30        SEND_VAR                                                     !0
         31        SEND_VAR                                                     !0
         32        DO_ICALL                                             $8      
         33        ECHO                                                         $8
         34        ECHO                                                         '%0A'
    9    35        ECHO                                                         'number_format%3A+'
         36        INIT_FCALL                                                   'number_format'
         37        SEND_VAR                                                     !0
         38        DO_ICALL                                             $9      
         39        ECHO                                                         $9
         40        ECHO                                                         '%0A'
    3    41      > JMP                                                          ->1
         42    >   FE_FREE                                                      $1
   10    43      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
142.94 ms | 501 KiB | 15 Q