3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test implements SessionHandlerInterface { public function close() { return true; } public function destroy($session_id) { return true; } public function gc($maxlifetime) { return true; } public function open($save_path, $session_name) { return true; } public function read($session_id) { return 'testtest|s:7:"testing";'; } public function write($session_id, $session_data) { $status = session_status(); if ($status === PHP_SESSION_NONE) { echo 'session is closed' . PHP_EOL; } elseif ($status === PHP_SESSION_ACTIVE) { echo 'session is active' . PHP_EOL; } else { throw new Exception("Unexpected"); } return true; } } $test = new Test(); session_set_save_handler($test); session_start(); session_write_close(); echo 'none: '; var_dump(PHP_SESSION_NONE ); echo 'active: '; var_dump(PHP_SESSION_ACTIVE );

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.00016.88
8.3.50.0030.01216.61
8.3.40.0070.00718.66
8.3.30.0110.00418.76
8.3.20.0070.00020.04
8.3.10.0090.00023.53
8.3.00.0000.00817.59
8.2.180.0110.00818.29
8.2.170.0040.01122.96
8.2.160.0030.01020.53
8.2.150.0050.00224.18
8.2.140.0040.00424.66
8.2.130.0050.00222.21
8.2.120.0040.00426.35
8.2.110.0090.00020.96
8.2.100.0110.00018.09
8.2.90.0000.00819.22
8.2.80.0050.00317.97
8.2.70.0100.00317.23
8.2.60.0030.00618.04
8.2.50.0080.00018.10
8.2.40.0000.00820.47
8.2.30.0000.00821.10
8.2.20.0000.00818.00
8.2.10.0070.00018.07
8.2.00.0000.00717.98
8.1.280.0110.00725.92
8.1.270.0080.00023.87
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0060.00323.79
8.1.230.0040.00819.13
8.1.220.0030.00517.74
8.1.210.0000.00818.77
8.1.200.0030.00617.23
8.1.190.0000.00817.10
8.1.180.0000.00918.10
8.1.170.0080.00018.51
8.1.160.0030.00319.07
8.1.150.0040.00418.90
8.1.140.0050.00219.63
8.1.130.0040.00418.91
8.1.120.0040.00417.47
8.1.110.0030.00517.36
8.1.100.0050.00317.39
8.1.90.0000.00717.50
8.1.80.0000.00717.50
8.1.70.0040.00417.36
8.1.60.0030.00517.68
8.1.50.0000.00817.54
8.1.40.0040.00417.42
8.1.30.0040.00417.68
8.1.20.0030.00917.60
8.1.10.0040.00417.52
8.1.00.0040.00417.41
8.0.300.0000.00718.77
8.0.290.0070.00016.63
8.0.280.0030.00318.45
8.0.270.0040.00417.26
8.0.260.0060.00016.85
8.0.250.0000.00616.92
8.0.240.0000.00716.91
8.0.230.0000.00716.97
8.0.220.0000.00716.82
8.0.210.0040.00416.82
8.0.200.0070.00016.94
8.0.190.0040.00417.00
8.0.180.0000.00816.95
8.0.170.0000.00816.78
8.0.160.0040.00416.88
8.0.150.0000.00816.81
8.0.140.0070.00016.84
8.0.130.0050.00013.38
8.0.120.0000.00716.88
8.0.110.0000.00716.74
8.0.100.0000.00816.73
8.0.90.0040.00416.74
8.0.80.0030.01316.93
8.0.70.0070.00016.91
8.0.60.0000.00716.95
8.0.50.0000.00716.90
8.0.30.0110.00916.91
8.0.20.0130.01217.40
8.0.10.0000.00816.85
8.0.00.0100.00716.75
7.4.330.0050.00015.55
7.4.320.0060.00016.55
7.4.300.0030.00316.67
7.4.290.0090.00316.61
7.4.280.0090.00016.43
7.4.270.0050.00316.45
7.4.260.0000.00716.66
7.4.250.0040.00416.47
7.4.240.0040.00416.66
7.4.230.0030.00316.72
7.4.220.0140.00716.64
7.4.210.0120.00616.66
7.4.200.0070.00016.44
7.4.160.0110.00616.54
7.4.150.0070.01117.40
7.4.140.0070.01317.86
7.4.130.0090.00916.57
7.4.120.0090.00816.52
7.4.110.0130.00316.65
7.4.100.0070.01116.42
7.4.90.0070.01016.46
7.4.80.0110.00919.39
7.4.70.0080.00816.37
7.4.60.0030.01316.39
7.4.50.0030.01216.49
7.4.40.0120.00416.42
7.4.30.0110.00616.51
7.4.00.0110.00515.00
7.3.330.0000.00613.15
7.3.320.0000.00513.28
7.3.310.0000.00716.14
7.3.300.0070.00016.38
7.3.290.0070.00816.33
7.3.280.0080.00816.29
7.3.270.0110.00817.40
7.3.260.0080.00916.45
7.3.250.0130.00716.46
7.3.240.0110.00916.58
7.3.230.0080.00816.31
7.3.210.0070.01016.39
7.3.200.0080.00816.23
7.3.190.0100.00616.58
7.3.180.0120.00916.38
7.3.170.0080.00816.37
7.3.160.0030.01316.45
7.3.120.0090.00914.91
7.3.110.0000.01714.68
7.3.100.0110.00414.74
7.3.90.0090.00014.89
7.3.80.0000.01014.68
7.3.70.0030.01014.86
7.3.60.0100.00314.65
7.3.50.0030.01214.77
7.3.40.0030.01014.93
7.3.30.0040.00814.81
7.3.20.0000.01516.72
7.3.10.0130.00016.57
7.3.00.0030.01016.78
7.2.330.0070.01016.42
7.2.320.0100.01016.50
7.2.310.0060.00916.41
7.2.300.0100.00716.68
7.2.290.0110.00516.55
7.2.250.0040.01514.91
7.2.240.0090.00915.17
7.2.230.0110.00314.66
7.2.220.0100.00715.15
7.2.210.0040.01514.84
7.2.200.0040.00715.07
7.2.190.0000.01515.14
7.2.180.0030.01314.99
7.2.170.0070.00715.05
7.2.60.0060.00616.95
7.2.00.0060.00619.38
7.1.330.0090.00615.94
7.1.320.0090.00615.46
7.1.310.0040.00715.79
7.1.300.0070.00715.85
7.1.290.0030.01015.88
7.1.280.0030.00615.83
7.1.270.0100.00315.85
7.1.260.0070.00715.77
7.1.200.0100.00315.82
7.1.100.0090.00318.06
7.1.70.0070.01016.87
7.1.60.0240.01035.17
7.1.50.0150.01934.76
7.1.40.0260.01034.45
7.1.30.0180.01934.42
7.1.20.0220.01334.60
7.1.10.0090.00616.61
7.1.00.0060.00916.73
7.0.200.0040.01816.55
7.0.190.0080.00816.61
7.0.180.0030.01415.93
7.0.170.0080.00816.11
7.0.160.0000.01416.30
7.0.150.0060.01016.13
7.0.140.0000.01616.36
7.0.130.0030.01116.32
7.0.120.0070.00916.31
7.0.110.0070.00716.11
7.0.100.0070.01116.15
7.0.90.0040.01116.09
7.0.80.0060.01316.03
7.0.70.0080.00916.21
7.0.60.0090.00616.04
7.0.50.0060.00916.05
7.0.40.0040.01216.30
7.0.30.0040.01216.37
7.0.20.0110.00616.52
7.0.10.0050.01116.38
7.0.00.0000.01716.57

preferences:
51.58 ms | 401 KiB | 5 Q