3v4l.org

run code in 300+ PHP versions simultaneously
<?php function s($n) { print "SET precision to $n\n"; print "\n"; ini_set('precision', $n); ini_set('serialize_precision', $n); } function dump($f) { print "var_export: ".var_export($f, true)."\n"; print "serialize: ".serialize($f)."\n"; print "json_encode: ".json_encode($f)."\n"; print "\n"; } $f = 10/3; s(3); dump($f);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pbQPZ
function name:  (null)
number of ops:  8
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   ASSIGN                                                   !0, 3.33333
   20     1        INIT_FCALL                                               's'
          2        SEND_VAL                                                 3
          3        DO_FCALL                                      0          
   21     4        INIT_FCALL                                               'dump'
          5        SEND_VAR                                                 !0
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Function s:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pbQPZ
function name:  s
number of ops:  15
compiled vars:  !0 = $n
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ROPE_INIT                                     3  ~2      'SET+precision+to+'
          2        ROPE_ADD                                      1  ~2      ~2, !0
          3        ROPE_END                                      2  ~1      ~2, '%0A'
          4        ECHO                                                     ~1
    5     5        ECHO                                                     '%0A'
    7     6        INIT_FCALL                                               'ini_set'
          7        SEND_VAL                                                 'precision'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
    8    10        INIT_FCALL                                               'ini_set'
         11        SEND_VAL                                                 'serialize_precision'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
    9    14      > RETURN                                                   null

End of function s

Function dump:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pbQPZ
function name:  dump
number of ops:  22
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        INIT_FCALL                                               'var_export'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $1      
          5        CONCAT                                           ~2      'var_export%3A+', $1
          6        CONCAT                                           ~3      ~2, '%0A'
          7        ECHO                                                     ~3
   13     8        INIT_FCALL                                               'serialize'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $4      
         11        CONCAT                                           ~5      'serialize%3A++', $4
         12        CONCAT                                           ~6      ~5, '%0A'
         13        ECHO                                                     ~6
   14    14        INIT_FCALL                                               'json_encode'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $7      
         17        CONCAT                                           ~8      'json_encode%3A+', $7
         18        CONCAT                                           ~9      ~8, '%0A'
         19        ECHO                                                     ~9
   15    20        ECHO                                                     '%0A'
   16    21      > RETURN                                                   null

End of function dump

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.24 ms | 1403 KiB | 23 Q