3v4l.org

run code in 300+ PHP versions simultaneously
<?php $angka = 8161824.6; $potong1 = substr($angka, 0, 3); $potong2 = ceil(substr($angka, 3, strlen($angka))); $bulat = substr($potong2, 1, 1); $bulat1 = substr($potong2, 0, 1); $bulat2 = $bulat>=5?$bulat1+1:$bulat1; $nol = ""; for ($i = 0;$i < strlen($potong2)-1;$i++) { $nol .= "0"; } echo $potong1.$bulat2.$nol;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 34
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
2 jumps found. (Code = 44) Position 1 = 45, Position 2 = 39
Branch analysis from position: 45
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
2 jumps found. (Code = 44) Position 1 = 45, Position 2 = 39
Branch analysis from position: 45
Branch analysis from position: 39
Branch analysis from position: 34
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
filename:       /in/0bG9e
function name:  (null)
number of ops:  49
compiled vars:  !0 = $angka, !1 = $potong1, !2 = $potong2, !3 = $bulat, !4 = $bulat1, !5 = $bulat2, !6 = $nol, !7 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 8.16182e+6
    3     1        INIT_FCALL                                               'substr'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 3
          5        DO_ICALL                                         $9      
          6        ASSIGN                                                   !1, $9
    4     7        INIT_FCALL                                               'ceil'
          8        INIT_FCALL                                               'substr'
          9        SEND_VAR                                                 !0
         10        SEND_VAL                                                 3
         11        STRLEN                                           ~11     !0
         12        SEND_VAL                                                 ~11
         13        DO_ICALL                                         $12     
         14        SEND_VAR                                                 $12
         15        DO_ICALL                                         $13     
         16        ASSIGN                                                   !2, $13
    5    17        INIT_FCALL                                               'substr'
         18        SEND_VAR                                                 !2
         19        SEND_VAL                                                 1
         20        SEND_VAL                                                 1
         21        DO_ICALL                                         $15     
         22        ASSIGN                                                   !3, $15
    6    23        INIT_FCALL                                               'substr'
         24        SEND_VAR                                                 !2
         25        SEND_VAL                                                 0
         26        SEND_VAL                                                 1
         27        DO_ICALL                                         $17     
         28        ASSIGN                                                   !4, $17
    7    29        IS_SMALLER_OR_EQUAL                                      5, !3
         30      > JMPZ                                                     ~19, ->34
         31    >   ADD                                              ~20     !4, 1
         32        QM_ASSIGN                                        ~21     ~20
         33      > JMP                                                      ->35
         34    >   QM_ASSIGN                                        ~21     !4
         35    >   ASSIGN                                                   !5, ~21
    8    36        ASSIGN                                                   !6, ''
    9    37        ASSIGN                                                   !7, 0
         38      > JMP                                                      ->41
   10    39    >   ASSIGN_OP                                     8          !6, '0'
    9    40        PRE_INC                                                  !7
         41    >   STRLEN                                           ~27     !2
         42        SUB                                              ~28     ~27, 1
         43        IS_SMALLER                                               !7, ~28
         44      > JMPNZ                                                    ~29, ->39
   12    45    >   CONCAT                                           ~30     !1, !5
         46        CONCAT                                           ~31     ~30, !6
         47        ECHO                                                     ~31
         48      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.48 ms | 1400 KiB | 17 Q