3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Result to be returned as json class Result implements \JsonSerializable { private $error; private $accessToken; public function __construct($anErrorName, $anAccessToken) { $this->error = $anErrorName; $this->accessToken = $anAccessToken; } public function jsonSerialize() { return get_object_vars($this); } } // 1. check if referer is Unity else echo error $referrer = (string)$_SERVER['HTTP_USER_AGENT']; if (strpos($referrer, 'Unity') !== false) { // we're pl } else { $result = new Result("true", 0); echo json_encode($result); exit(); } foreach( $_POST as $key=>$value) { if( is_array( $value ) ) { foreach( $value as $thing ) { echo $thing . "\xA"; } } else { echo "$key=$value" . "\xA"; } } echo'test' . "\xA";; ?>

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.75
8.3.50.0110.01116.27
8.3.40.0150.00018.75
8.3.30.0090.00618.97
8.3.20.0040.00420.35
8.3.10.0080.00023.70
8.3.00.0030.00521.98
8.2.180.0110.00716.75
8.2.170.0040.01122.96
8.2.160.0110.00419.22
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0070.00319.32
8.2.120.0040.00426.35
8.2.110.0040.00720.92
8.2.100.0060.00618.00
8.2.90.0000.00819.23
8.2.80.0040.00418.05
8.2.70.0090.00317.63
8.2.60.0000.00918.05
8.2.50.0080.00018.10
8.2.40.0000.00820.59
8.2.30.0000.00719.35
8.2.20.0000.00718.08
8.2.10.0030.00518.14
8.2.00.0000.00718.14
8.1.280.0100.00325.92
8.1.270.0080.00022.18
8.1.260.0050.00226.35
8.1.250.0050.00228.09
8.1.240.0060.00320.96
8.1.230.0120.00019.01
8.1.220.0090.00017.74
8.1.210.0040.00418.77
8.1.200.0040.00417.22
8.1.190.0080.00017.25
8.1.180.0040.00418.10
8.1.170.0040.00419.08
8.1.160.0040.00418.96
8.1.150.0040.00420.73
8.1.140.0070.00019.51
8.1.130.0000.00919.02
8.1.120.0040.00417.52
8.1.110.0040.00417.43
8.1.100.0000.00817.48
8.1.90.0000.00817.41
8.1.80.0040.00417.50
8.1.70.0000.00717.50
8.1.60.0080.00017.60
8.1.50.0090.00017.55
8.1.40.0000.00817.54
8.1.30.0040.00417.72
8.1.20.0040.00417.68
8.1.10.0050.00317.62
8.1.00.0000.00717.46
8.0.300.0070.00020.13
8.0.290.0030.00616.88
8.0.280.0030.00318.46
8.0.270.0040.00417.28
8.0.260.0050.00316.82
8.0.250.0000.00716.95
8.0.240.0000.00716.98
8.0.230.0070.00316.99
8.0.220.0070.00016.98
8.0.210.0000.00716.98
8.0.200.0060.00017.02
8.0.190.0000.00817.03
8.0.180.0030.00617.04
8.0.170.0040.00417.04
8.0.160.0040.00416.90
8.0.150.0040.00416.96
8.0.140.0040.00416.86
8.0.130.0030.00313.38
8.0.120.0070.00016.87
8.0.110.0070.00017.00
8.0.100.0040.00416.83
8.0.90.0070.00016.97
8.0.80.0120.00916.90
8.0.70.0000.00716.84
8.0.60.0040.00417.03
8.0.50.0030.00516.98
8.0.30.0090.00717.07
8.0.20.0110.00717.40
8.0.10.0060.00317.05
8.0.00.0070.01016.96
7.4.330.0000.00515.55
7.4.320.0030.00316.65
7.4.300.0000.00616.54
7.4.290.0000.00816.57
7.4.280.0030.00616.58
7.4.270.0070.00016.39
7.4.260.0000.00616.51
7.4.250.0080.00016.58
7.4.240.0040.00416.52
7.4.230.0070.00016.28
7.4.220.0090.01016.54
7.4.210.0030.01216.45
7.4.200.0040.00416.65
7.4.160.0110.00616.36
7.4.150.0090.01017.40
7.4.140.0130.00517.86
7.4.130.0140.00716.55
7.4.120.0110.00716.50
7.4.110.0090.00916.49
7.4.100.0070.01116.64
7.4.90.0090.00916.76
7.4.80.0100.00619.39
7.4.70.0080.00816.60
7.4.60.0100.00716.68
7.4.50.0000.01616.43
7.4.40.0150.00616.57
7.4.30.0030.01316.55
7.4.00.0070.00914.79
7.3.330.0040.00313.41
7.3.320.0030.00313.45
7.3.310.0040.00416.40
7.3.300.0000.00616.43
7.3.290.0080.00616.43
7.3.280.0070.01016.36
7.3.270.0100.01417.40
7.3.260.0130.00616.62
7.3.250.0110.00716.47
7.3.240.0110.00816.43
7.3.230.0180.00016.56
7.3.210.0110.00616.49
7.3.200.0060.00916.35
7.3.190.0120.00516.41
7.3.180.0150.00816.39
7.3.170.0100.00716.34
7.3.160.0110.00516.57
7.3.120.0090.00914.97
7.3.110.0070.00914.80
7.3.100.0110.00514.85
7.3.90.0050.01014.76
7.3.80.0090.00714.94
7.3.70.0050.00614.74
7.3.60.0040.00714.88
7.3.50.0090.00714.82
7.3.40.0050.00914.78
7.3.30.0040.00914.73
7.3.20.0090.00516.71
7.3.10.0090.00816.63
7.3.00.0060.00716.60
7.2.330.0150.00316.84
7.2.320.0110.00716.76
7.2.310.0070.01016.71
7.2.300.0100.00716.63
7.2.290.0210.01016.86
7.2.250.0090.00715.18
7.2.240.0060.01315.24
7.2.230.0050.01115.19
7.2.220.0050.00815.03
7.2.210.0040.01215.04
7.2.200.0030.00915.12
7.2.190.0060.00915.19
7.2.180.0070.00914.99
7.2.170.0050.01115.13
7.2.160.0080.00815.02
7.2.150.0090.00416.91
7.2.140.0040.01117.03
7.2.130.0050.01017.08
7.2.120.0060.00816.82
7.2.110.0080.00616.81
7.2.100.0100.00816.72
7.2.90.0020.01217.04
7.2.80.0040.00916.91
7.2.70.0040.00916.86
7.2.60.0090.00716.90
7.2.50.0120.00516.86
7.2.40.0100.00716.62
7.2.30.0080.00916.89
7.2.20.0090.00616.84
7.2.10.0080.00916.71
7.2.00.0070.00917.65
7.1.330.0070.00915.97
7.1.320.0060.00815.78
7.1.310.0060.00715.99
7.1.300.0080.00615.68
7.1.290.0030.01215.88
7.1.280.0100.00315.77
7.1.270.0020.01215.82
7.1.260.0020.01015.63
7.1.250.0080.00815.90
7.1.240.0050.00515.77
7.1.230.0000.01715.92
7.1.220.0050.00315.82
7.1.210.0060.00615.91
7.1.200.0080.00515.88
7.1.190.0000.01415.95
7.1.180.0070.00715.76
7.1.170.0110.00015.92
7.1.160.0030.01015.71
7.1.150.0070.00315.61
7.1.140.0000.01015.57
7.1.130.0100.00315.55
7.1.120.0000.00815.79
7.1.110.0080.00815.82
7.1.100.0050.00916.99
7.1.90.0000.01615.96
7.1.80.0030.01015.96
7.1.70.0040.01016.58
7.1.60.0160.00525.39
7.1.50.0080.01125.45
7.1.40.0080.01125.13
7.1.30.0170.00524.92
7.1.20.0160.01025.34
7.1.10.0030.01216.20
7.1.00.0040.01216.17
7.0.330.0070.00715.47
7.0.320.0030.00915.38
7.0.310.0070.00315.46
7.0.300.0110.00315.11
7.0.290.0000.01315.27
7.0.280.0040.00715.20
7.0.270.0070.00715.46
7.0.260.0080.00415.40
7.0.250.0070.00315.61
7.0.240.0080.00415.42
7.0.230.0060.00615.47
7.0.220.0000.01115.42
7.0.210.0030.00915.41
7.0.200.0060.00616.11
7.0.190.0040.00616.06
7.0.180.0050.00715.74
7.0.170.0050.00715.81
7.0.160.0040.01115.82
7.0.150.0080.00815.69
7.0.140.0050.01015.83
7.0.130.0050.01015.90
7.0.120.0050.00615.99
7.0.110.0090.00515.86
7.0.100.0020.01215.85
7.0.90.0060.01015.81
7.0.80.0090.00515.80
7.0.70.0020.00915.88
7.0.60.0030.01215.57
7.0.50.0080.00715.63
7.0.40.0040.01215.01
7.0.30.0030.01114.87
7.0.20.0060.00915.01
7.0.10.0000.01214.91
7.0.00.0020.01214.94
5.6.400.0120.00014.26
5.6.390.0030.00614.71
5.6.380.0030.00714.36
5.6.370.0070.00714.56
5.6.360.0080.00514.40
5.6.350.0150.00014.23
5.6.340.0070.00714.50
5.6.330.0120.00014.25
5.6.320.0000.01514.12
5.6.310.0060.00914.62
5.6.300.0030.00714.31
5.6.290.0070.00714.26
5.6.280.0090.00314.64
5.6.270.0040.00814.56
5.6.260.0100.00614.55
5.6.250.0030.00614.52
5.6.240.0060.00814.61
5.6.230.0080.00414.59
5.6.220.0000.01314.58
5.6.210.0040.01114.42
5.6.200.0030.01014.38
5.6.190.0120.00314.37
5.6.180.0000.01714.55
5.6.170.0040.00814.27
5.6.160.0110.00414.50
5.6.150.0140.00314.55
5.6.140.0070.00714.27
5.6.130.0090.00614.42
5.6.120.0000.01614.51
5.6.110.0070.00714.13
5.6.100.0000.01214.54
5.6.90.0000.01314.48
5.6.80.0030.01014.46
5.6.70.0040.01114.48
5.6.60.0030.00714.39
5.6.50.0060.01014.19
5.6.40.0110.00414.40
5.6.30.0070.00714.27
5.6.20.0000.01114.46
5.6.10.0100.00614.48
5.6.00.0110.00014.29

preferences:
44.66 ms | 401 KiB | 5 Q