3v4l.org

run code in 300+ PHP versions simultaneously
<?php $n = 1000; $digits = 3; echo number_format($n, max(0,$digits-strlen((string)intval($n))), null, '');

Abusive script

This script was stopped while abusing our resources

Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JVrmJ
function name:  (null)
number of ops:  18
compiled vars:  !0 = $n, !1 = $digits
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 1000
    3     1        ASSIGN                                                   !1, 3
    4     2        INIT_FCALL                                               'number_format'
          3        SEND_VAR                                                 !0
          4        INIT_FCALL                                               'max'
          5        SEND_VAL                                                 0
          6        CAST                                          4  ~4      !0
          7        CAST                                          6  ~5      ~4
          8        STRLEN                                           ~6      ~5
          9        SUB                                              ~7      !1, ~6
         10        SEND_VAL                                                 ~7
         11        DO_ICALL                                         $8      
         12        SEND_VAR                                                 $8
         13        SEND_VAL                                                 null
         14        SEND_VAL                                                 ''
         15        DO_ICALL                                         $9      
         16        ECHO                                                     $9
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.92 ms | 1394 KiB | 17 Q