3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('display_startup_errors', 1); ini_set('display_errors', 1); error_reporting(-1); function test1($type) { return $type === 'foo'; } function test2($type) { return $type === 'bar'; } $value = 'teststring'; foreach (['foo', 'bar'] as $type) { $isDefined = test1($type); $shouldBeTextArea = mb_strlen($value) > 255; if ($isDefined) { continue; } if ($shouldBeTextArea) { $inputType = self::TEXT_AREA_INPUT_TYPE; } } foreach (['foo', 'bar'] as $type) { $isDefined = test2($type); $shouldBeTextArea = mb_strlen($value) > 255; if ($isDefined) { continue; } if ($shouldBeTextArea) { $inputType = self::TEXT_AREA_INPUT_TYPE; } }

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.70.0120.00316.63
8.3.60.0140.00718.08
8.3.50.0070.00717.95
8.3.40.0100.00718.86
8.3.30.0070.00718.71
8.3.20.0080.00021.72
8.3.10.0030.00523.71
8.3.00.0080.00019.56
8.2.180.0030.01718.37
8.2.170.0110.00422.96
8.2.160.0100.01022.14
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00419.21
8.2.120.0040.00426.35
8.2.110.0060.00322.13
8.2.100.0100.00317.53
8.2.90.0040.00417.75
8.2.80.0040.00417.97
8.2.70.0050.00317.63
8.2.60.0090.00017.50
8.2.50.0040.00417.93
8.2.40.0030.00617.89
8.2.30.0030.00617.60
8.2.20.0030.00618.02
8.2.10.0030.00718.12
8.2.00.0000.00719.79
8.1.280.0070.00725.92
8.1.270.0050.00322.19
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00322.02
8.1.230.0040.00819.14
8.1.220.0000.00817.79
8.1.210.0000.00818.77
8.1.200.0060.00317.36
8.1.190.0030.00617.23
8.1.180.0080.00018.10
8.1.170.0040.00417.62
8.1.160.0000.00718.80
8.1.150.0000.00720.20
8.1.140.0040.00417.77
8.1.130.0000.00719.02
8.1.120.0040.00417.51
8.1.110.0000.00717.33
8.1.100.0000.00717.43
8.1.90.0000.00717.48
8.1.80.0000.00917.50
8.1.70.0070.00017.35
8.1.60.0030.00617.68
8.1.50.0060.00317.53
8.1.40.0020.00517.62
8.1.30.0030.00617.61
8.1.20.0040.00417.75
8.1.10.0000.00717.55
8.1.00.0030.00617.39
8.0.300.0060.00319.77
8.0.290.0060.00316.75
8.0.280.0030.00318.07
8.0.270.0030.00318.02
8.0.260.0040.00416.95
8.0.250.0000.00617.04
8.0.240.0000.00716.93
8.0.230.0000.00817.06
8.0.220.0000.00716.95
8.0.210.0030.00316.95
8.0.200.0050.00216.97
8.0.190.0040.00416.91
8.0.180.0000.00816.99
8.0.170.0060.00316.86
8.0.160.0030.00517.08
8.0.150.0000.00716.88
8.0.140.0000.00816.80
8.0.130.0000.00613.36
8.0.120.0040.00416.95
8.0.110.0050.00216.98
8.0.100.0000.00716.96
8.0.90.0040.00416.85
8.0.80.0140.00316.99
8.0.70.0030.00516.98
8.0.60.0080.00016.76
8.0.50.0040.00416.95
8.0.30.0090.00917.14
8.0.20.0090.01317.40
8.0.10.0030.00516.84
8.0.00.0080.01016.67
7.4.330.0020.00215.55
7.4.320.0000.00816.62
7.4.300.0030.00316.57
7.4.290.0040.00416.50
7.4.280.0040.00416.55
7.4.270.0040.00416.67
7.4.260.0000.00716.53
7.4.250.0000.00716.53
7.4.240.0030.00316.65
7.4.230.0070.00016.50
7.4.220.0000.00816.50
7.4.210.0070.00716.70
7.4.200.0030.00316.63
7.4.160.0120.00516.54
7.4.140.0100.01217.86
7.4.130.0120.00916.72
7.4.120.0120.00716.57
7.4.110.0100.00616.57
7.4.100.0090.00916.43
7.4.90.0090.01216.52
7.4.80.0080.01319.39
7.4.70.0060.01116.42
7.4.60.0100.00716.45
7.4.50.0090.00616.48
7.4.40.0110.00616.47
7.4.00.0040.01214.91
7.3.330.0060.00013.35
7.3.320.0000.00613.24
7.3.310.0070.00016.39
7.3.300.0030.00316.27
7.3.290.0070.00016.32
7.3.280.0010.01416.38
7.3.260.0130.00716.34
7.3.240.0070.01116.43
7.3.230.0070.01016.52
7.3.210.0060.01416.31
7.3.200.0080.00816.45
7.3.190.0030.01216.56
7.3.180.0040.01116.57
7.3.170.0060.01616.47
7.3.160.0080.00816.34
7.3.120.0220.00515.18
7.3.110.0220.00615.13
7.3.100.0220.00815.03
7.3.90.0160.01114.70
7.3.80.0220.00614.98
7.3.70.0190.00415.05
7.3.60.0140.00614.83
7.3.50.0120.00415.05
7.3.40.0090.01214.79
7.3.30.0070.01114.77
7.3.20.0170.00816.73
7.3.10.0090.01416.70
7.3.00.0000.01416.71
7.2.330.0100.00716.61
7.2.320.0150.00316.78
7.2.310.0100.01316.68
7.2.300.0040.01416.54
7.2.290.0170.00016.67
7.2.240.0180.00915.10
7.2.230.0190.00514.82
7.2.220.0180.01015.23
7.2.210.0080.02214.80
7.2.200.0150.01014.77
7.2.190.0110.00815.10
7.2.180.0040.01115.09
7.2.170.0070.01815.15
7.2.160.0040.01715.12
7.2.150.0190.00516.71
7.2.140.0090.01516.82
7.2.130.0000.01417.01
7.2.120.0000.01616.38
7.2.110.0070.00716.75
7.2.100.0110.01216.80
7.2.90.0090.01216.96
7.2.80.0060.00916.84
7.2.70.0090.00616.79
7.2.60.0030.00916.65
7.2.50.0030.00917.05
7.2.40.0100.00317.02
7.2.30.0040.01116.98
7.2.20.0080.01418.18
7.2.10.0080.01318.20
7.2.00.0110.01217.96
7.1.330.0110.01815.76
7.1.320.0180.00915.65
7.1.310.0150.01115.85
7.1.300.0100.00615.92
7.1.290.0040.01715.74
7.1.280.0150.01115.66
7.1.270.0140.00315.79
7.1.260.0090.01515.63
7.1.250.0090.00915.78
7.1.200.0040.00715.94
7.1.140.0150.00917.64
7.1.130.0140.01017.59
7.1.120.0140.01017.61
7.1.110.0230.01116.88
7.1.100.0140.01117.01
7.1.90.0160.01217.26
7.1.80.0130.01417.19
7.1.70.0140.01116.15
7.1.60.0350.02134.24
7.1.50.0300.01633.95
7.1.40.0450.01634.56
7.1.30.0360.01434.58
7.1.20.0260.01634.63
7.1.10.0090.01216.56
7.1.00.0130.01016.88

preferences:
110.96 ms | 400 KiB | 5 Q