3v4l.org

run code in 300+ PHP versions simultaneously
<?php class DemoBugSessionHandler implements SessionHandlerInterface { public function open($save_path, $name) { return true; } /** * Read session data * @link https://php.net/manual/en/sessionhandlerinterface.read.php * @param string $session_id The session id to read data for. * @return string <p> * Returns an encoded string of the read data. * If nothing was read, it must return an empty string. * Note this value is returned internally to PHP for processing. * </p> * @since 5.4.0 */ public function read($session_id) { // Simulate a session ID regeneration. \session_id('newsessionid'); return ''; } /** * Write session data * @link https://php.net/manual/en/sessionhandlerinterface.write.php * @param string $session_id The session id. * @param string $session_data <p> * The encoded session data. This data is the * result of the PHP internally encoding * the $_SESSION superglobal to a serialized * string and passing it as this parameter. * Please note sessions use an alternative serialization method. * </p> * @return bool <p> * The return value (usually TRUE on success, FALSE on failure). * Note this value is returned internally to PHP for processing. * </p> * @since 5.4.0 */ public function write($session_id, $session_data) { // Print back to the user agent the $session_id // that is going to be persisted when the script finishes. echo $session_id . PHP_EOL; return true; } public function destroy($session_id) { return true; } public function close() { return true; } public function gc($maxlifetime) { return true; } } ini_set('session.use_strict_mode', '1'); session_set_save_handler(new \DemoBugSessionHandler(), true); session_start(); echo ini_get('session.use_strict_mode') . PHP_EOL;

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.0150.00916.50
8.3.50.0100.01018.20
8.3.40.0030.01318.70
8.3.30.0120.00318.66
8.3.20.0000.00721.94
8.3.10.0000.00923.65
8.3.00.0080.00023.63
8.2.180.0070.01116.75
8.2.170.0110.01122.96
8.2.160.0070.00720.21
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00019.36
8.2.110.0060.00319.27
8.2.100.0080.00417.91
8.2.90.0030.00618.92
8.2.80.0000.00917.97
8.2.70.0000.00817.63
8.2.60.0000.00817.80
8.2.50.0000.00818.07
8.2.40.0050.00218.04
8.2.30.0080.00018.09
8.2.20.0030.00518.06
8.2.10.0000.00719.07
8.2.00.0000.00719.24
8.1.280.0130.00325.92
8.1.270.0040.00418.92
8.1.260.0060.00326.35
8.1.250.0000.00828.09
8.1.240.0070.00722.14
8.1.230.0070.00317.42
8.1.220.0000.00817.74
8.1.210.0030.00618.77
8.1.200.0000.00817.23
8.1.190.0040.00417.23
8.1.180.0000.00818.10
8.1.170.0000.00818.55
8.1.160.0000.00718.84
8.1.150.0000.00718.76
8.1.140.0040.00418.89
8.1.130.0030.00320.16
8.1.120.0040.00417.48
8.1.110.0040.00717.41
8.1.100.0000.00817.36
8.1.90.0080.00317.31
8.1.80.0000.00717.41
8.1.70.0000.00717.45
8.1.60.0040.00417.44
8.1.50.0050.00317.36
8.1.40.0080.00017.46
8.1.30.0000.01117.50
8.1.20.0030.00617.61
8.1.10.0030.00617.52
8.1.00.0060.00317.47
8.0.300.0000.00718.77
8.0.290.0100.00016.75
8.0.280.0000.00818.38
8.0.270.0000.00717.33
8.0.260.0030.00318.37
8.0.250.0000.00716.93
8.0.240.0030.00317.07
8.0.230.0000.00716.90
8.0.220.0000.00716.91
8.0.210.0050.00316.80
8.0.200.0080.00016.95
8.0.190.0000.00816.86
8.0.180.0000.00716.88
8.0.170.0080.00316.90
8.0.160.0030.00616.90
8.0.150.0050.00316.85
8.0.140.0040.00416.80
8.0.130.0000.00613.42
8.0.120.0030.00316.91
8.0.110.0070.00016.89
8.0.100.0000.00716.90
8.0.90.0000.00716.93
8.0.80.0090.01216.97
8.0.70.0050.00216.82
8.0.60.0000.00816.74
8.0.50.0050.00216.78
8.0.30.0150.00417.04
8.0.20.0090.00917.40
8.0.10.0040.00416.90
8.0.00.0110.01017.03
7.4.330.0000.00515.55
7.4.320.0030.00316.56
7.4.300.0060.00016.59
7.4.290.0000.00716.48
7.4.280.0000.00816.46
7.4.270.0040.00416.60
7.4.260.0000.00716.53
7.4.250.0030.00516.47
7.4.240.0030.00316.54
7.4.230.0040.00416.46
7.4.220.0080.00016.49
7.4.210.0070.00916.49
7.4.200.0000.00716.58
7.4.160.0100.00816.38
7.4.140.0080.00917.86
7.4.130.0090.00916.56
7.4.120.0060.01816.68
7.4.110.0080.01016.49
7.4.100.0120.00616.52
7.4.90.0070.01016.66
7.4.80.0100.00619.39
7.4.70.0030.01216.59
7.4.60.0070.01016.57
7.4.50.0050.00816.55
7.4.40.0100.00716.52
7.4.00.0060.01115.18
7.3.330.0030.00313.41
7.3.320.0000.00613.31
7.3.310.0030.00316.24
7.3.300.0040.00416.24
7.3.290.0030.00316.42
7.3.280.0050.01216.33
7.3.260.0090.01016.37
7.3.240.0080.00916.44
7.3.230.0060.01216.52
7.3.210.0060.01216.31
7.3.200.0080.00816.50
7.3.190.0090.01216.32
7.3.180.0090.00616.41
7.3.170.0130.00316.41
7.3.160.0100.00716.37
7.3.120.0080.00614.94
7.3.110.0080.00814.86
7.3.100.0040.00815.00
7.3.90.0030.00915.04
7.3.80.0070.01014.84
7.3.70.0040.00614.81
7.3.60.0040.00714.59
7.3.50.0090.00614.95
7.3.40.0090.00614.91
7.3.30.0040.00814.77
7.3.20.0050.01016.68
7.3.10.0760.01015.69
7.3.00.0800.00815.80
7.2.330.0030.01416.33
7.2.320.0070.01016.65
7.2.310.0070.01016.47
7.2.300.0120.00616.73
7.2.290.0100.00716.75
7.2.250.0080.01115.04
7.2.240.0080.00815.03
7.2.230.0050.01114.84
7.2.220.0050.01115.07
7.2.210.0070.00714.77
7.2.200.0070.00715.01
7.2.190.0070.00714.94
7.2.180.0100.00414.91
7.2.170.0050.00515.10
7.2.160.0060.01214.98
7.2.150.0070.00716.98
7.2.140.0030.00916.98
7.2.130.0560.00715.50
7.2.120.1110.00815.66
7.2.110.0340.00915.66
7.2.100.0450.01115.52
7.2.90.0540.00915.53
7.2.80.1030.00215.55
7.2.70.1520.00715.76
7.2.60.0100.00715.70
7.2.50.1010.00615.49
7.2.40.0660.00715.68
7.2.30.0980.00715.54
7.2.20.0330.00615.64
7.2.10.0480.01215.59
7.2.00.0540.00715.68
7.1.330.0060.00815.79
7.1.320.0040.00615.56
7.1.310.0030.01015.61
7.1.300.0020.00815.60
7.1.290.0060.00715.67
7.1.280.0030.00715.63
7.1.270.0060.00815.68
7.1.260.0050.01015.84
7.1.250.1370.00814.44

preferences:
57.67 ms | 400 KiB | 5 Q