3v4l.org

run code in 300+ PHP versions simultaneously
<?php function diff($credit, $payment) { $credit = (int) $credit; $payment = (int) $payment; // unknown logic, could be a simple diff // like could be a payment process! echo $credit - $payment; } // good developer diff(2, 1); diff(2.5, 1.3); // good developer not strict diff('2', '1'); // good developer doing mistakes diff(2, array('foo' => 'bar')); diff(2, new GenericClassInjected);

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.3.60.0060.01216.63
8.3.50.0120.00921.95
8.3.40.0120.00318.96
8.3.30.0110.00318.76
8.3.20.0080.00020.10
8.3.10.0050.00323.56
8.3.00.0080.00019.26
8.2.180.0150.00618.29
8.2.170.0070.01322.96
8.2.160.0100.00322.16
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0050.00519.28
8.2.120.0040.00426.35
8.2.110.0060.00622.30
8.2.100.0090.00317.93
8.2.90.0050.00319.22
8.2.80.0040.00417.97
8.2.70.0040.00417.63
8.2.60.0040.00418.16
8.2.50.0030.00618.07
8.2.40.0050.00319.34
8.2.30.0040.00420.54
8.2.20.0050.00517.76
8.2.10.0000.00717.98
8.2.00.0050.00217.87
8.1.280.0070.00725.92
8.1.270.0120.00322.10
8.1.260.0070.00028.09
8.1.250.0070.00028.09
8.1.240.0030.00622.56
8.1.230.0040.00717.66
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0060.00317.36
8.1.190.0000.00817.10
8.1.180.0040.00418.10
8.1.170.0060.00318.57
8.1.160.0040.00421.98
8.1.150.0000.00818.77
8.1.140.0040.00419.48
8.1.130.0030.00317.64
8.1.120.0000.00717.36
8.1.110.0040.00417.43
8.1.100.0000.00717.40
8.1.90.0030.00317.30
8.1.80.0000.00717.41
8.1.70.0030.00317.43
8.1.60.0060.00317.57
8.1.50.0060.00317.55
8.1.40.0030.00617.44
8.1.30.0000.00817.64
8.1.20.0000.00817.56
8.1.10.0030.00517.59
8.1.00.0040.00417.56
8.0.300.0040.00418.77
8.0.290.0000.00816.75
8.0.280.0000.00718.49
8.0.270.0030.00317.32
8.0.260.0070.00017.26
8.0.250.0000.00716.89
8.0.240.0000.00717.03
8.0.230.0000.00816.93
8.0.220.0000.00716.78
8.0.210.0030.00316.91
8.0.200.0000.00616.86
8.0.190.0050.00316.84
8.0.180.0040.00416.78
8.0.170.0040.00416.84
8.0.160.0000.00816.86
8.0.150.0030.00316.76
8.0.140.0000.01016.82
8.0.130.0000.00513.32
8.0.120.0000.00816.83
8.0.110.0070.00016.93
8.0.100.0000.00716.91
8.0.90.0040.00416.93
8.0.80.0100.01116.96
8.0.70.0080.00016.77
8.0.60.0000.00816.76
8.0.50.0040.00316.82
8.0.30.0090.00917.15
8.0.20.0070.01717.40
8.0.10.0070.00016.89
8.0.00.0110.00916.80
7.4.330.0050.00016.70
7.4.320.0030.00316.59
7.4.300.0030.00316.43
7.4.290.0030.00316.61
7.4.280.0000.01016.59
7.4.270.0000.00716.65
7.4.260.0030.00316.61
7.4.250.0050.00216.39
7.4.240.0030.00316.60
7.4.230.0030.00316.58
7.4.220.0110.00716.65
7.4.210.0090.00916.58
7.4.200.0040.00416.63
7.4.160.0060.00916.66
7.4.150.0140.00317.40
7.4.140.0130.00817.86
7.4.130.0100.01016.64
7.4.120.0080.00916.68
7.4.110.0140.01116.64
7.4.100.0060.01416.62
7.4.90.0070.01016.43
7.4.80.0140.00319.39
7.4.70.0100.00716.34
7.4.60.0090.00616.57
7.4.50.0030.01316.62
7.4.40.0140.00316.50
7.4.30.0080.01516.79
7.4.00.0070.00714.84
7.3.330.0020.00213.35
7.3.320.0000.00513.19
7.3.310.0000.00716.22
7.3.300.0030.00316.21
7.3.290.0030.00316.32
7.3.280.0080.00716.33
7.3.270.0130.00317.40
7.3.260.0120.00916.43
7.3.240.0100.01116.36
7.3.230.0070.01116.50
7.3.210.0090.00916.29
7.3.200.0030.01316.47
7.3.190.0130.00916.50
7.3.180.0060.00916.51
7.3.170.0140.00716.53
7.3.160.0110.00516.32
7.2.330.0120.00616.23
7.2.320.0040.01316.59
7.2.310.0000.01616.70
7.2.300.0130.00316.58
7.2.290.0090.00716.57
7.2.60.0070.00716.51
7.2.00.0040.01119.29
7.1.200.0100.00015.55
7.1.100.0000.01117.96
7.1.70.0040.00417.11
7.1.60.0100.01319.48
7.1.50.0160.00916.82
7.1.00.0100.07022.51
7.0.200.0340.00815.01
7.0.60.0070.08319.87
7.0.50.0070.03717.95
7.0.40.0030.04719.96
7.0.30.0030.04320.15
7.0.20.0400.07020.05
7.0.10.0030.06720.26
7.0.00.0000.09320.18
5.6.280.0000.04020.79
5.6.210.0070.04020.53
5.6.200.0100.07718.25
5.6.190.0030.04320.54
5.6.180.0330.07020.61
5.6.170.0200.03720.57
5.6.160.0070.07720.59
5.6.150.0030.08718.16
5.6.140.0070.04018.11
5.6.130.0030.08018.15
5.6.120.0000.04721.10
5.6.110.0070.08721.11
5.6.100.0130.07721.04
5.6.90.0030.05321.02
5.6.80.0100.04020.50
5.5.350.3730.04320.43
5.5.340.0170.04717.99
5.5.330.0130.03320.20
5.5.320.0570.07020.28
5.5.310.0200.08720.36
5.5.300.0030.08317.97
5.5.290.0030.04017.98
5.5.280.0070.06020.82
5.5.270.0130.08320.64
5.5.260.0030.04320.64
5.5.250.0100.05720.68
5.5.240.0330.07020.36

preferences:
42.41 ms | 401 KiB | 5 Q