3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('VALIDTYPES', [ 'double' => 'd', 'integer' => 'i', 'resource' => 'b', // I haven't actually researched/tested this 'string' => 's', ]); $params = [1, -3.5, 'stringy', (object)[]]; $params = [1, -3.5, 'stringy']; $types = array_reduce( $params, function($carry, $item) { $type = gettype($item); if (!isset(VALIDTYPES[$type])) { throw new Exception('unexpected data type'); } else { return $carry . VALIDTYPES[$type]; } }, ''); var_export($types);

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.0140.00718.50
8.3.50.0110.01118.06
8.3.40.0090.00918.64
8.3.30.0060.01218.89
8.3.20.0000.00820.65
8.3.10.0040.00420.10
8.3.00.0050.00323.65
8.2.180.0040.01118.29
8.2.170.0120.00622.96
8.2.160.0110.00720.35
8.2.150.0060.00324.18
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0050.00326.16
8.2.110.0030.00619.45
8.2.100.0000.01217.78
8.2.90.0050.00320.55
8.2.80.0100.00017.97
8.2.70.0080.00017.93
8.2.60.0040.00418.22
8.2.50.0060.00318.10
8.2.40.0050.00319.30
8.2.30.0000.00719.40
8.2.20.0070.00018.18
8.2.10.0040.00419.21
8.2.00.0000.00819.32
8.1.280.0140.00425.92
8.1.270.0030.00520.82
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0030.00622.51
8.1.230.0090.00320.78
8.1.220.0080.00017.79
8.1.210.0040.00418.89
8.1.200.0070.00417.35
8.1.190.0080.00317.00
8.1.180.0040.00418.10
8.1.170.0080.00018.66
8.1.160.0000.00718.82
8.1.150.0040.00418.81
8.1.140.0000.00720.76
8.1.130.0070.00020.15
8.1.120.0040.00417.41
8.1.110.0040.00417.36
8.1.100.0000.00717.52
8.1.90.0030.00717.44
8.1.80.0040.00417.41
8.1.70.0100.00017.40
8.1.60.0000.00817.50
8.1.50.0030.00617.57
8.1.40.0040.00417.59
8.1.30.0000.00717.71
8.1.20.0000.01017.63
8.1.10.0030.00617.44
8.1.00.0040.00417.54
8.0.300.0040.00419.97
8.0.290.0040.00416.75
8.0.280.0050.00318.46
8.0.270.0070.00017.26
8.0.260.0060.00020.00
8.0.250.0000.00717.07
8.0.240.0000.00817.07
8.0.230.0050.00316.99
8.0.220.0070.00016.83
8.0.210.0070.00016.92
8.0.200.0000.00816.97
8.0.190.0080.00016.92
8.0.180.0000.00717.02
8.0.170.0040.00417.00
8.0.160.0000.00816.98
8.0.150.0040.00416.93
8.0.140.0070.00016.93
8.0.130.0060.00013.48
8.0.120.0030.00516.98
8.0.110.0000.00717.02
8.0.100.0070.00017.04
8.0.90.0040.00416.96
8.0.80.0070.00716.91
8.0.70.0050.00216.99
8.0.60.0040.00416.96
8.0.50.0040.00417.02
8.0.30.0060.00917.21
8.0.20.0110.01216.92
8.0.10.0000.00717.15
8.0.00.0110.00916.79
7.4.330.0050.00015.55
7.4.320.0030.00316.61
7.4.300.0030.00316.59
7.4.290.0040.00416.52
7.4.280.0000.00716.52
7.4.270.0030.00316.46
7.4.260.0000.00816.53
7.4.250.0070.00016.57
7.4.240.0070.00016.52
7.4.230.0000.00716.72
7.4.220.0030.00416.56
7.4.210.0080.00716.60
7.4.200.0030.00316.26
7.4.130.0100.01316.56
7.4.120.0130.00616.58
7.4.110.0100.00716.51
7.4.100.0070.01016.42
7.4.90.0110.00516.53
7.4.80.0100.00719.39
7.4.70.0060.01116.57
7.4.60.0100.01016.43
7.4.50.0030.01216.71
7.4.40.0100.00716.68
7.4.00.0030.01015.01
7.3.330.0040.00416.46
7.3.320.0030.00313.41
7.3.310.0030.00316.27
7.3.300.0040.00416.30
7.3.290.0030.00416.32
7.3.280.0040.01116.28
7.3.260.0130.00616.52
7.3.230.0080.00916.50
7.3.210.0030.01716.64
7.3.200.0120.00916.38
7.3.190.0000.02016.42
7.3.180.0100.01416.45
7.3.170.0070.01016.61
7.3.160.0150.00716.41
7.3.80.0130.00314.63
7.3.70.0060.00614.65
7.3.60.0060.00614.50
7.3.50.0120.00014.36
7.3.40.0070.00714.32
7.3.30.0100.01014.48
7.3.20.0140.00014.21
7.3.10.0110.00414.53
7.3.00.0120.00614.55
7.2.330.0160.00916.45
7.2.320.0180.00016.36
7.2.310.0070.01016.47
7.2.300.0140.00716.66
7.2.290.0090.01216.74
7.2.210.0090.00314.80
7.2.200.0100.01014.63
7.2.190.0040.00814.52
7.2.180.0060.00814.73
7.2.170.0080.00814.58
7.2.160.0030.01014.70
7.2.150.0070.00714.74
7.2.140.0070.01014.36
7.2.130.0140.00014.62
7.2.120.0100.00314.57
7.2.110.0150.00014.98
7.2.100.0140.00014.46
7.2.90.0060.00914.61
7.2.80.0130.00314.78
7.2.70.0160.00415.05
7.2.60.0100.01014.66
7.2.50.0060.00915.07
7.2.40.0160.00014.88
7.2.30.0040.01614.82
7.2.20.0050.01114.83
7.2.10.0050.00914.73
7.2.00.0110.00415.06
7.1.310.0120.00613.56
7.1.300.0100.00313.67
7.1.290.0130.00313.72
7.1.280.0030.01013.57
7.1.270.0110.00713.66
7.1.260.0120.00613.98
7.1.250.0070.00713.79

preferences:
69.86 ms | 400 KiB | 5 Q