3v4l.org

run code in 300+ PHP versions simultaneously
<?php // 1. check if referer is Unity else echo error 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); } } $result = new Result("true", 0); echo json_encode($result); $referrer = (string)$_SERVER['HTTP_USER_AGENT']; foreach( $_POST as $key=>$value) { if( is_array( $value ) ) { foreach( $value as $thing ) { echo $thing . "\xA"; } } else { echo "$key=$value" . "\xA"; } } echo'test' . "\xA";; if (strpos($referrer, 'Unity') !== false) { echo 'true'; } else echo 'false'; ?>

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.0150.00616.75
8.3.60.0120.00616.75
8.3.50.0150.00316.76
8.3.40.0150.00018.79
8.3.30.0070.00718.92
8.3.20.0050.00320.16
8.3.10.0040.00423.53
8.3.00.0080.00022.00
8.2.190.0090.00616.63
8.2.180.0090.00916.75
8.2.170.0110.00422.96
8.2.160.0060.00919.16
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0000.00721.00
8.2.110.0080.00022.13
8.2.100.0060.00617.78
8.2.90.0030.00519.30
8.2.80.0030.00618.05
8.2.70.0070.00317.63
8.2.60.0000.00918.05
8.2.50.0080.00018.10
8.2.40.0000.00820.59
8.2.30.0040.00419.35
8.2.20.0040.00418.16
8.2.10.0000.00818.16
8.2.00.0000.00718.14
8.1.280.0070.00725.92
8.1.270.0040.00422.14
8.1.260.0030.00626.35
8.1.250.0000.00828.09
8.1.240.0060.00321.09
8.1.230.0110.00019.12
8.1.220.0090.00017.74
8.1.210.0000.00818.77
8.1.200.0040.00417.36
8.1.190.0040.00417.36
8.1.180.0030.00618.10
8.1.170.0060.00318.87
8.1.160.0040.00419.00
8.1.150.0040.00420.60
8.1.140.0030.00519.48
8.1.130.0000.01218.86
8.1.120.0040.00417.52
8.1.110.0030.00517.32
8.1.100.0080.00017.44
8.1.90.0020.00517.36
8.1.80.0000.00717.39
8.1.70.0050.00317.38
8.1.60.0040.00417.50
8.1.50.0040.00417.43
8.1.40.0000.00817.52
8.1.30.0000.00817.60
8.1.20.0000.00817.69
8.1.10.0040.00417.62
8.1.00.0040.00417.54
8.0.300.0000.00720.08
8.0.290.0040.00416.63
8.0.280.0040.00418.48
8.0.270.0080.00017.27
8.0.260.0000.00616.97
8.0.250.0030.00316.98
8.0.240.0040.00416.92
8.0.230.0030.00717.07
8.0.220.0080.00016.98
8.0.210.0030.00416.86
8.0.200.0030.00317.00
8.0.190.0050.00516.91
8.0.180.0040.00416.89
8.0.170.0040.00416.92
8.0.160.0030.00317.04
8.0.150.0050.00316.91
8.0.140.0040.00416.94
8.0.130.0030.00313.37
8.0.120.0050.00316.99
8.0.110.0070.00016.87
8.0.100.0000.00716.89
8.0.90.0050.00216.93
8.0.80.0090.00916.93
8.0.70.0070.00016.83
8.0.60.0030.00617.05
8.0.50.0030.00517.00
8.0.30.0120.00617.12
8.0.20.0100.01017.40
8.0.10.0000.00716.98
8.0.00.0080.00816.64
7.4.330.0020.00215.55
7.4.320.0000.00616.55
7.4.300.0030.00316.62
7.4.290.0030.00316.62
7.4.280.0000.00716.64
7.4.270.0030.00316.50
7.4.260.0070.00016.44
7.4.250.0030.00516.35
7.4.240.0050.00316.55
7.4.230.0070.00016.45
7.4.220.0080.01016.43
7.4.210.0100.00716.56
7.4.200.0070.00016.66
7.4.160.0090.01116.61
7.4.150.0100.01417.40
7.4.140.0140.00717.86
7.4.130.0120.01216.63
7.4.120.0130.00416.49
7.4.110.0030.01316.50
7.4.100.0150.00316.45
7.4.90.0140.00316.41
7.4.80.0090.01319.39
7.4.70.0060.01016.63
7.4.60.0070.01116.54
7.4.50.0070.01116.72
7.4.40.0170.00316.68
7.4.30.0060.01216.33
7.4.00.0070.01015.10
7.3.330.0070.00013.50
7.3.320.0000.00513.37
7.3.310.0030.00316.40
7.3.300.0050.00216.27
7.3.290.0020.01216.40
7.3.280.0080.00916.42
7.3.270.0090.00917.40
7.3.260.0130.00916.46
7.3.250.0090.01016.33
7.3.240.0090.00916.39
7.3.230.0110.00716.55
7.3.210.0150.00916.49
7.3.200.0070.01016.36
7.3.190.0100.00716.27
7.3.180.0100.00616.48
7.3.170.0030.01216.49
7.3.160.0100.00716.60
7.2.330.0190.00016.82
7.2.320.0070.01016.79
7.2.310.0130.00316.60
7.2.300.0090.00916.77
7.2.290.0040.01316.68
7.2.60.0140.00317.03
7.1.200.0210.00415.78
7.1.100.0210.00916.44
7.1.70.0090.00617.20
7.1.60.0200.00835.09
7.1.50.0190.01334.88
7.1.40.0120.02034.60
7.1.30.0180.01534.63
7.1.20.0110.02134.63
7.1.10.0090.00616.67
7.1.00.0090.00916.82
7.0.200.0080.00516.70
7.0.190.0040.01116.48
7.0.180.0080.00616.37
7.0.170.0060.00916.19
7.0.160.0110.00416.20
7.0.150.0120.00316.19
7.0.140.0140.00516.40
7.0.130.0100.00316.63
7.0.120.0080.00616.34
7.0.110.0060.00916.04
7.0.100.0040.01216.28
7.0.90.0060.01016.34
7.0.80.0060.01016.25
7.0.70.0090.01216.15
7.0.60.0030.01015.96
7.0.50.0040.01116.50
7.0.40.0030.01016.31
7.0.30.0050.00916.36
7.0.20.0030.01016.07
7.0.10.0090.00416.23
7.0.00.0070.00716.11

preferences:
48.03 ms | 401 KiB | 5 Q