3v4l.org

run code in 300+ PHP versions simultaneously
<?php // $n1 > 10^10 $n1 = new \BcMath\Number('100000000000'); $n2 = new \BcMath\Number('1'); echo $n2->div($n1) . "\n"; echo bcdiv($n2, $n1, 11). "\n\n"; // $n1 <= 10^10 $n1 = new \BcMath\Number('10000000000'); $n2 = new \BcMath\Number('1'); echo $n2->div($n1) . "\n"; echo bcdiv($n2, $n1, 11);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/R0sik
function name:  (null)
number of ops:  40
compiled vars:  !0 = $n1, !1 = $n2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $2      'BcMath%5CNumber'
          1        SEND_VAL_EX                                              '100000000000'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    5     4        NEW                                              $5      'BcMath%5CNumber'
          5        SEND_VAL_EX                                              '1'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $5
    6     8        INIT_METHOD_CALL                                         !1, 'div'
          9        SEND_VAR_EX                                              !0
         10        DO_FCALL                                      0  $8      
         11        CONCAT                                           ~9      $8, '%0A'
         12        ECHO                                                     ~9
    7    13        INIT_FCALL_BY_NAME                                       'bcdiv'
         14        SEND_VAR_EX                                              !1
         15        SEND_VAR_EX                                              !0
         16        SEND_VAL_EX                                              11
         17        DO_FCALL                                      0  $10     
         18        CONCAT                                           ~11     $10, '%0A%0A'
         19        ECHO                                                     ~11
   10    20        NEW                                              $12     'BcMath%5CNumber'
         21        SEND_VAL_EX                                              '10000000000'
         22        DO_FCALL                                      0          
         23        ASSIGN                                                   !0, $12
   11    24        NEW                                              $15     'BcMath%5CNumber'
         25        SEND_VAL_EX                                              '1'
         26        DO_FCALL                                      0          
         27        ASSIGN                                                   !1, $15
   12    28        INIT_METHOD_CALL                                         !1, 'div'
         29        SEND_VAR_EX                                              !0
         30        DO_FCALL                                      0  $18     
         31        CONCAT                                           ~19     $18, '%0A'
         32        ECHO                                                     ~19
   13    33        INIT_FCALL_BY_NAME                                       'bcdiv'
         34        SEND_VAR_EX                                              !1
         35        SEND_VAR_EX                                              !0
         36        SEND_VAL_EX                                              11
         37        DO_FCALL                                      0  $20     
         38        ECHO                                                     $20
         39      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.76 ms | 1000 KiB | 13 Q