3v4l.org

run code in 500+ PHP versions simultaneously
<?php $GST = Array ( 18 ); $Amount = Array ( 25000 ); $Discount = Array ( 10 ); array_map( function($GST, $Amount, $Discount){ var_dump($GST, $Amount, $Discount); echo PHP_EOL; echo 'GST: '.$GST.' Amount: '.$Amount.' Discount: '.$Discount.PHP_EOL; echo 'Discount: '.(($Amount * $Discount) / 100).' Amount After Discount: '.($Amount - (($Amount * $Discount) / 100)).PHP_EOL; echo 'GST: '.(($Amount - (($Amount * $Discount) / 100)) * $GST / 100).PHP_EOL; //return ($Amount - (($Amount * $Discount) / 100)) * $GST / 100; }, !is_array($GST) ? [] : $GST, !is_array($Amount) ? [] : $Amount, !is_array($Discount) ? [] : $Discount );
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 25
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 25
Branch analysis from position: 23
Branch analysis from position: 25
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
Branch analysis from position: 18
filename:       /in/SqgJO
function name:  (null)
number of ops:  29
compiled vars:  !0 = $GST, !1 = $Amount, !2 = $Discount
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    4     1        ASSIGN                                                       !1, <array>
    5     2        ASSIGN                                                       !2, <array>
    6     3        INIT_FCALL                                                   'array_map'
    7     4        DECLARE_LAMBDA_FUNCTION                              ~6      [0]
   14     5        SEND_VAL                                                     ~6
   15     6        TYPE_CHECK                                      128  ~7      !0
          7        BOOL_NOT                                             ~8      ~7
          8      > JMPZ                                                         ~8, ->11
          9    >   QM_ASSIGN                                            ~9      <array>
         10      > JMP                                                          ->12
         11    >   QM_ASSIGN                                            ~9      !0
         12    >   SEND_VAL                                                     ~9
   16    13        TYPE_CHECK                                      128  ~10     !1
         14        BOOL_NOT                                             ~11     ~10
         15      > JMPZ                                                         ~11, ->18
         16    >   QM_ASSIGN                                            ~12     <array>
         17      > JMP                                                          ->19
         18    >   QM_ASSIGN                                            ~12     !1
         19    >   SEND_VAL                                                     ~12
   17    20        TYPE_CHECK                                      128  ~13     !2
         21        BOOL_NOT                                             ~14     ~13
         22      > JMPZ                                                         ~14, ->25
         23    >   QM_ASSIGN                                            ~15     <array>
         24      > JMP                                                          ->26
         25    >   QM_ASSIGN                                            ~15     !2
         26    >   SEND_VAL                                                     ~15
    6    27        DO_ICALL                                                     
   18    28      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SqgJO
function name:  {closure:/in/SqgJO:7}
number of ops:  35
compiled vars:  !0 = $GST, !1 = $Amount, !2 = $Discount
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        RECV                                                 !2      
    8     3        INIT_FCALL                                                   'var_dump'
          4        SEND_VAR                                                     !0
          5        SEND_VAR                                                     !1
          6        SEND_VAR                                                     !2
          7        DO_ICALL                                                     
    9     8        ECHO                                                         '%0A'
   10     9        CONCAT                                               ~4      'GST%3A+', !0
         10        CONCAT                                               ~5      ~4, '+Amount%3A+'
         11        CONCAT                                               ~6      ~5, !1
         12        CONCAT                                               ~7      ~6, '+Discount%3A+'
         13        CONCAT                                               ~8      ~7, !2
         14        CONCAT                                               ~9      ~8, '%0A'
         15        ECHO                                                         ~9
   11    16        MUL                                                  ~10     !1, !2
         17        DIV                                                  ~11     ~10, 100
         18        CONCAT                                               ~12     'Discount%3A+', ~11
         19        CONCAT                                               ~13     ~12, '+Amount+After+Discount%3A+'
         20        MUL                                                  ~14     !1, !2
         21        DIV                                                  ~15     ~14, 100
         22        SUB                                                  ~16     !1, ~15
         23        CONCAT                                               ~17     ~13, ~16
         24        CONCAT                                               ~18     ~17, '%0A'
         25        ECHO                                                         ~18
   12    26        MUL                                                  ~19     !1, !2
         27        DIV                                                  ~20     ~19, 100
         28        SUB                                                  ~21     !1, ~20
         29        MUL                                                  ~22     !0, ~21
         30        DIV                                                  ~23     ~22, 100
         31        CONCAT                                               ~24     'GST%3A+', ~23
         32        CONCAT                                               ~25     ~24, '%0A'
         33        ECHO                                                         ~25
   14    34      > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
158.91 ms | 2015 KiB | 15 Q