3v4l.org

run code in 300+ PHP versions simultaneously
<?php $results = array ( 0 => array ( 'id' => 1, 'location' => 3, 'location_fees' => 3, 'gross_percentage' => 25, 'transaction_percentage' => 0, 'user_name' => 'admin', 'user_id' => 1, 'gross' => 'yes', 'transaction' => 'no' ), 1 => array ( 'id' => 2, 'location' => 5, 'location_fees' => 5, 'gross_percentage' => 0, 'transaction_percentage' => 24, 'user_name' => 'admin', 'user_id' => 1, 'gross' => 'no', 'transaction' => 'yes' ), 2 => array ( 'id' => 3, 'location' => 2, 'location_fees' => 5, 'gross_percentage' => 10, 'transaction_percentage' => 0, 'user_name' => 'admin', 'user_id' => 1, 'gross' => 'yes', 'transaction' => 'no' ) ); $search = ['gross' => 'yes']; foreach ($results as $k => $v) { echo "key $k<br>" . PHP_EOL; if ($v['gross'] == $search['gross'] ) { $location_fees = $v['location_fees']; echo "The location fees: ". $location_fees ." % <br><br>" . PHP_EOL; $gross_percentage = $v['gross_percentage']; echo "The gross_percentage is: ".$gross_percentage ."% <br><br>" . PHP_EOL; } else { $tran_perc = $v['transaction_percentage']; echo "The locations percentage is: ".$tran_perc ." % <br>" . PHP_EOL; $the_loc = $v['location']; echo "The location is: ".$the_loc ." <br>" . PHP_EOL; $location_fees = $v['location_fees']; echo "The location fees: ". $location_fees ." % <br><br>" . PHP_EOL; } }

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.4.10.0060.00319.43
8.3.140.0080.00016.81
8.3.130.0060.00318.34
8.3.120.0000.00918.68
8.3.110.0090.00020.94
8.3.100.0040.00416.84
8.3.90.0130.00626.77
8.3.80.0030.00716.75
8.3.70.0140.00716.58
8.3.60.0030.01716.38
8.3.50.0110.00624.43
8.3.40.0070.00718.68
8.3.30.0150.00618.65
8.3.20.0030.00624.18
8.3.10.0040.00424.66
8.3.00.0080.00026.16
8.2.260.0050.00319.04
8.2.250.0000.00816.87
8.2.240.0060.01319.04
8.2.230.0000.00822.58
8.2.220.0030.00624.06
8.2.210.0040.00426.77
8.2.200.0090.00016.75
8.2.190.0100.00716.58
8.2.180.0120.00325.92
8.2.170.0190.00319.08
8.2.160.0100.00322.96
8.2.150.0080.00025.66
8.2.140.0000.00824.66
8.2.130.0020.00526.16
8.2.120.0040.00426.35
8.2.110.0030.00721.18
8.2.100.0110.00017.84
8.2.90.0050.00317.84
8.2.80.0040.00418.05
8.2.70.0000.00818.05
8.2.60.0040.00418.09
8.2.50.0060.00317.63
8.2.40.0040.00419.48
8.2.30.0040.00418.13
8.2.20.0000.00818.25
8.2.10.0000.00719.35
8.2.00.0000.00719.43
8.1.310.0070.01116.94
8.1.300.0080.00019.75
8.1.290.0070.00430.84
8.1.280.0040.01125.92
8.1.270.0060.00323.99
8.1.260.0080.00028.09
8.1.250.0070.00028.09
8.1.240.0100.00023.99
8.1.230.0070.00320.92
8.1.220.0000.00817.78
8.1.210.0040.00418.95
8.1.200.0030.00717.38
8.1.190.0080.00017.22
8.1.180.0080.00018.10
8.1.170.0070.00019.01
8.1.160.0000.00718.95
8.1.150.0000.00718.78
8.1.140.0000.00718.92
8.1.130.0000.00720.21
8.1.120.0030.00617.37
8.1.110.0000.00717.37
8.1.100.0070.00017.38
8.1.90.0000.01017.45
8.1.80.0040.00417.49
8.1.70.0000.00717.38
8.1.60.0060.00317.55
8.1.50.0080.00417.55
8.1.40.0000.00917.54
8.1.30.0000.00817.54
8.1.20.0050.00517.59
8.1.10.0000.00717.60
8.1.00.0080.00017.39
8.0.300.0000.00719.68
8.0.290.0040.00416.75
8.0.280.0050.00218.52
8.0.270.0070.00018.03
8.0.260.0030.00318.46
8.0.250.0030.00316.91
8.0.240.0030.00316.95
8.0.230.0000.00716.98
8.0.220.0070.00016.87
8.0.210.0030.00516.89
8.0.200.0040.00416.93
8.0.190.0050.00217.00
8.0.180.0000.00816.90
8.0.170.0050.00516.84
8.0.160.0000.00816.93
8.0.150.0070.00016.74
8.0.140.0030.00316.85
8.0.130.0050.00013.36
8.0.120.0070.00016.80
8.0.110.0030.00516.98
8.0.100.0070.00016.94
8.0.90.0000.00716.81
8.0.80.0110.00616.85
8.0.70.0000.00816.98
8.0.60.0030.00616.83
8.0.50.0040.00416.69
8.0.30.0090.00817.05
8.0.20.0140.00517.06
8.0.10.0070.00016.84
8.0.00.0090.00916.55
7.4.330.0030.00315.55
7.4.320.0030.00316.52
7.4.300.0070.00016.60
7.4.290.0000.00816.44
7.4.280.0040.00416.43
7.4.270.0070.00016.63
7.4.260.0030.00313.34
7.4.250.0000.00716.45
7.4.240.0000.00716.43
7.4.230.0040.00416.45
7.4.220.0050.00216.56
7.4.210.0060.00916.56
7.4.200.0030.00316.52
7.4.130.0130.00316.49
7.4.120.0130.00916.63
7.4.110.0120.00516.61
7.4.100.0120.00416.61
7.4.90.0070.01016.50
7.4.80.0110.01119.39
7.4.70.0090.00816.51
7.4.60.0090.01116.58
7.4.50.0090.00916.48
7.4.40.0100.00916.52
7.4.30.0120.00716.42
7.4.20.0100.00816.43
7.4.10.0130.00816.45
7.4.00.0090.00916.48
7.3.330.0030.00516.31
7.3.320.0060.00013.20
7.3.310.0000.00716.32
7.3.300.0000.00616.33
7.3.290.0110.00716.40
7.3.280.0030.01216.27
7.3.260.0100.01016.55
7.3.240.0090.00916.41
7.3.230.0050.01116.34
7.3.210.0090.00916.52
7.3.200.0090.00916.24
7.3.190.0130.00716.45
7.3.180.0110.00716.35
7.3.170.0070.01116.45
7.3.160.0110.00716.27
7.3.150.0070.01116.42
7.3.140.0080.00916.45
7.3.130.0080.01016.37
7.3.120.0050.01416.43
7.3.110.0100.00816.24
7.3.100.0100.00916.47
7.3.90.0120.01016.45
7.3.80.0040.01416.41
7.3.70.0080.00816.39
7.3.60.0120.00916.30
7.3.50.0100.01116.28
7.3.40.0090.00916.37
7.3.30.0120.01116.34
7.3.20.0160.00616.33
7.3.10.0160.00716.45
7.3.00.0130.00816.35
7.2.330.0140.00716.77
7.2.310.0040.01316.69
7.2.300.0050.01216.61
7.2.290.0060.01316.61
7.2.280.0110.00616.66
7.2.270.0050.01316.60
7.2.260.0050.01316.48
7.2.250.0070.01116.64
7.2.240.0080.01116.72
7.2.230.0080.01116.68
7.2.220.0130.00816.56
7.2.210.0110.00816.63
7.2.200.0060.01316.61
7.2.190.0110.01116.52
7.2.180.0150.00716.63
7.2.170.0100.01016.58
7.2.160.0060.01516.68
7.2.150.0100.01216.57
7.2.140.0200.01016.68
7.2.130.0120.00916.66
7.2.120.0130.00916.68
7.2.110.0140.01116.64
7.2.100.0150.00916.60
7.2.90.0240.01116.64
7.2.80.0150.00916.65
7.2.70.0110.01016.58
7.2.60.0110.01016.64
7.2.50.0080.01316.69
7.2.40.0090.01016.68
7.2.30.0100.01116.70
7.2.20.0130.00916.65
7.2.10.0170.00817.28
7.2.00.0180.01016.68
7.1.330.0350.00315.88
7.1.320.0260.00715.65
7.1.310.0240.01215.57
7.1.300.0290.00415.67
7.1.290.0110.01915.72
7.1.280.0270.01215.64
7.1.270.0320.01215.72
7.1.260.0240.01115.66
7.1.250.0250.01415.51
7.1.240.0260.00815.54
7.1.230.0300.01015.38
7.1.220.0300.00715.48
7.1.210.0280.00615.47
7.1.200.0270.01415.55
7.1.190.0290.01015.43
7.1.180.0240.01615.60
7.1.170.0230.00915.54
7.1.160.0350.00315.70
7.1.150.0250.00815.64
7.1.140.0260.00615.37
7.1.130.0160.01615.44
7.1.120.0240.01015.42
7.1.110.0190.01515.46
7.1.100.0260.01015.69
7.1.90.0190.01715.56
7.1.80.0360.00715.46
7.1.70.0150.01515.64
7.1.60.0210.01515.73
7.1.50.0210.01615.68
7.1.40.0110.01815.44
7.1.30.0440.01515.77
7.1.20.0190.01415.57
7.1.10.0780.00715.56
7.1.00.0190.01615.53
7.0.330.0170.01215.31
7.0.320.0240.01515.14
7.0.310.0210.02115.27
7.0.300.0230.01015.29
7.0.290.0130.01815.25
7.0.280.0120.01915.36
7.0.270.0180.01415.20
7.0.260.0260.00615.19
7.0.250.0210.01215.16
7.0.240.0230.00815.20
7.0.230.0190.01515.55
7.0.220.0220.00915.27
7.0.210.0090.01815.17
7.0.200.0260.00315.23
7.0.190.0200.01115.22
7.0.180.0190.01315.14
7.0.170.0210.01515.27
7.0.160.0220.01415.30
7.0.150.0280.00315.17
7.0.140.0230.01315.41
7.0.130.0290.00615.39
7.0.120.0190.01515.20
7.0.110.0130.01515.05
7.0.100.0260.00615.41
7.0.90.0280.00815.22
7.0.80.0230.01015.17
7.0.70.0220.01315.30
7.0.60.0270.00915.36
7.0.50.0280.00715.07
7.0.40.0280.00315.22
7.0.30.0160.01315.26
7.0.20.0260.00915.27
7.0.10.0270.00915.25
7.0.00.0330.00315.34
5.6.400.0290.01015.77
5.6.390.0260.01215.74
5.6.380.0190.01616.06
5.6.370.0260.01515.78
5.6.360.0280.00715.82
5.6.350.0230.01016.00
5.6.340.0220.01316.17
5.6.330.0240.00615.80
5.6.320.0200.01316.20
5.6.310.0190.01316.13
5.6.300.0230.01316.16
5.6.290.0240.00915.82
5.6.280.0330.00315.93
5.6.270.0250.00916.08
5.6.260.0190.01316.09
5.6.250.0180.01816.05
5.6.240.0220.01215.98
5.6.230.0220.01916.05
5.6.220.0220.01615.85
5.6.210.0230.01916.02
5.6.200.0290.01115.87
5.6.190.0210.01416.04
5.6.180.0200.01016.14
5.6.170.0260.01415.86
5.6.160.0240.01015.88
5.6.150.0230.00715.98
5.6.140.0220.01616.16
5.6.130.0150.02316.19
5.6.120.0160.02216.04
5.6.110.0240.00715.95
5.6.100.0200.01415.79
5.6.90.0190.01116.24
5.6.80.0280.00415.83
5.6.70.0230.01215.72
5.6.60.0290.01215.87
5.6.50.0230.01015.89
5.6.40.0240.01016.20
5.6.30.0210.01315.99
5.6.20.0220.01315.79
5.6.10.0250.01115.84
5.6.00.0270.00815.97
5.5.380.0240.00915.75
5.5.370.0220.01116.01
5.5.360.0210.01816.09
5.5.350.0280.01215.96
5.5.340.0250.01015.97
5.5.330.0190.01215.75
5.5.320.0140.01815.98
5.5.310.0290.01015.71
5.5.300.0240.01116.22
5.5.290.0210.01215.81
5.5.280.0280.00616.03
5.5.270.0280.00916.01
5.5.260.0240.00915.95
5.5.250.0160.01715.89
5.5.240.0220.01515.91
5.5.230.0210.01615.77
5.5.220.0170.01715.99
5.5.210.0150.02216.02
5.5.200.0180.01916.02
5.5.190.0270.01215.82
5.5.180.0180.01515.87
5.5.170.0250.01115.94
5.5.160.0200.01315.80
5.5.150.0260.01116.14
5.5.140.0220.00915.64
5.5.130.0230.01015.63
5.5.120.0170.01715.91
5.5.110.0290.00615.93
5.5.100.0200.00915.68
5.5.90.0230.01115.95
5.5.80.0240.00716.11
5.5.70.0260.00815.77
5.5.60.0210.01315.85
5.5.50.0240.00715.95
5.5.40.0240.01016.02
5.5.30.0200.01515.81
5.5.20.0260.01115.77
5.5.10.0140.01415.77
5.5.00.0240.00815.96
5.4.450.0220.00712.72
5.4.440.0210.00312.80
5.4.430.0110.01112.66
5.4.420.0200.00312.79
5.4.410.0180.01212.73
5.4.400.0160.01212.57
5.4.390.0150.01512.75
5.4.380.0170.01112.75
5.4.370.0180.00612.55
5.4.360.0190.01112.75
5.4.350.0180.00712.53
5.4.340.0160.01012.71
5.4.330.0140.01412.51
5.4.320.0150.00712.55
5.4.310.0180.00912.47
5.4.300.0150.01212.42
5.4.290.0200.00812.69
5.4.280.0140.00912.48
5.4.270.0230.00012.73
5.4.260.0180.00412.54
5.4.250.0170.00912.71
5.4.240.0240.00612.51
5.4.230.0210.00712.47
5.4.220.0120.01212.73
5.4.210.0170.00612.73
5.4.200.0180.01212.59
5.4.190.0150.01212.49
5.4.180.0230.00612.52
5.4.170.0290.00712.48
5.4.160.0180.00912.55
5.4.150.0150.00812.52
5.4.140.0170.01212.57
5.4.130.0200.00812.57
5.4.120.0160.00812.54
5.4.110.0170.00912.68
5.4.100.0140.01412.50
5.4.90.0100.01612.45
5.4.80.0170.01112.64
5.4.70.0120.01812.50
5.4.60.0170.00712.71
5.4.50.0170.01112.77
5.4.40.0140.01412.67
5.4.30.0150.01012.72
5.4.20.0260.00012.63
5.4.10.0160.00812.63
5.4.00.0130.01012.49
5.3.290.0160.00812.66
5.3.280.0150.00912.79
5.3.270.0200.01012.70
5.3.260.0120.01612.94
5.3.250.0200.00412.85
5.3.240.0170.00912.58
5.3.230.0160.00812.59
5.3.220.0150.01612.61
5.3.210.0220.00812.68
5.3.200.0240.00412.61
5.3.190.0200.01012.64
5.3.180.0190.00812.77
5.3.170.0170.00913.06
5.3.160.0180.01212.91
5.3.150.0180.01212.96
5.3.140.0200.00713.00
5.3.130.0230.00812.86
5.3.120.0160.01312.99
5.3.110.0110.01512.91
5.3.100.0240.00412.73
5.3.90.0130.01012.90
5.3.80.0130.01012.79
5.3.70.0180.00912.69
5.3.60.0130.01012.83
5.3.50.0270.00012.70
5.3.40.0160.00812.69
5.3.30.0140.01012.71
5.3.20.0180.01212.89
5.3.10.0190.01012.57
5.3.00.0260.00612.55
5.2.170.0160.00612.06
5.2.160.0190.00312.06
5.2.150.0140.00512.06
5.2.140.0180.00612.06
5.2.130.0130.01212.06
5.2.120.0160.00912.06
5.2.110.0100.00312.06
5.2.100.0210.00612.06
5.2.90.0170.01112.06
5.2.80.0160.01012.06
5.2.70.0160.01212.06
5.2.60.0160.01012.06
5.2.50.0180.00912.06
5.2.40.0060.01212.06
5.2.30.0190.00812.06
5.2.20.0090.01512.06
5.2.10.0120.01012.06
5.2.00.0170.00712.06
5.1.60.0160.00612.06
5.1.50.0190.00912.06
5.1.40.0080.01112.06
5.1.30.0250.00212.06
5.1.20.0140.00812.06
5.1.10.0150.00312.06
5.1.00.0150.00612.06
5.0.50.0150.00412.06
5.0.40.0110.00712.06
5.0.30.0150.00312.06
5.0.20.0090.01012.06
5.0.10.0150.00212.06
5.0.00.0080.00812.06
4.4.90.0090.00212.06
4.4.80.0060.00212.06
4.4.70.0060.00612.06
4.4.60.0110.00012.06
4.4.50.0080.00312.06
4.4.40.0060.00712.06
4.4.30.0050.00912.06
4.4.20.0130.00012.06
4.4.10.0090.00412.06
4.4.00.0120.00012.06
4.3.110.0030.00712.06
4.3.100.0090.00212.06
4.3.90.0060.00612.06
4.3.80.0100.00212.06
4.3.70.0080.00312.06
4.3.60.0040.00812.06
4.3.50.0030.00612.06
4.3.40.0060.00612.06
4.3.30.0100.00012.06
4.3.20.0080.00012.06
4.3.10.0070.00412.06
4.3.00.0000.01012.06

preferences:
76.92 ms | 403 KiB | 5 Q