3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MySessionHandler implements \SessionHandlerInterface { public function open($savePath, $sessionName) { echo 'open ' . $sessionName . "\n"; } public function close() { echo 'close' . "\n"; } public function read($id) { echo 'read ' . $id . "\n"; } public function write($id, $data) { echo 'write ' . $id . ': ' . $data . "\n"; } public function destroy($id) { echo 'destroy ' . $id . "\n"; } public function gc($maxlifetime) { echo 'gc ' . $maxlifetime . "\n"; } } $handler = new MySessionHandler(); session_set_save_handler($handler, true); session_start(); $_SESSION['foo'] = 'bar'; echo session_id(); session_regenerate_id(); echo session_id(); session_destroy(); session_start(); session_write_close();

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.0090.00616.63
8.3.50.0090.00822.18
8.3.40.0040.01118.91
8.3.30.0110.00319.22
8.3.20.0060.00320.16
8.3.10.0050.00223.65
8.3.00.0040.00420.95
8.2.180.0180.00018.54
8.2.170.0070.00722.96
8.2.160.0100.00720.47
8.2.150.0000.00924.18
8.2.140.0060.00324.66
8.2.130.0050.00326.16
8.2.120.0060.00320.88
8.2.110.0000.01022.23
8.2.100.0060.00617.91
8.2.90.0030.00519.34
8.2.80.0000.00817.97
8.2.70.0080.00017.50
8.2.60.0040.00417.93
8.2.50.0000.00818.07
8.2.40.0040.00418.34
8.2.30.0040.00418.11
8.2.20.0000.00817.61
8.2.10.0040.00417.74
8.2.00.0000.00717.75
8.1.280.0040.01125.92
8.1.270.0080.00024.01
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0060.00323.60
8.1.230.0070.00319.15
8.1.220.0050.00317.74
8.1.210.0080.00018.77
8.1.200.0000.01017.35
8.1.190.0030.00517.53
8.1.180.0050.00318.10
8.1.170.0070.00418.59
8.1.160.0040.00422.09
8.1.150.0050.00218.65
8.1.140.0000.00717.50
8.1.130.0000.00717.70
8.1.120.0040.00417.31
8.1.110.0000.00817.53
8.1.100.0000.00717.47
8.1.90.0020.00517.41
8.1.80.0000.00717.48
8.1.70.0070.00017.44
8.1.60.0000.00717.59
8.1.50.0000.00817.53
8.1.40.0020.00517.56
8.1.30.0040.00417.61
8.1.20.0050.00317.64
8.1.10.0000.00717.48
8.1.00.0080.00017.40
8.0.300.0070.00018.77
8.0.290.0080.00017.05
8.0.280.0030.00318.30
8.0.270.0030.00317.29
8.0.260.0030.00316.99
8.0.250.0070.00016.98
8.0.240.0000.00816.92
8.0.230.0000.00716.89
8.0.220.0060.00016.95
8.0.210.0030.00316.92
8.0.200.0070.00017.04
8.0.190.0000.00817.00
8.0.180.0040.00416.90
8.0.170.0040.00416.95
8.0.160.0000.00716.93
8.0.150.0080.00017.01
8.0.140.0030.00516.96
8.0.130.0030.00313.41
8.0.120.0000.00816.93
8.0.110.0000.00816.94
8.0.100.0040.00416.81
8.0.90.0040.00417.02
8.0.80.0150.00316.95
8.0.70.0050.00216.78
8.0.60.0040.00416.91
8.0.50.0000.00816.75
8.0.30.0070.01217.25
8.0.20.0060.01217.40
8.0.10.0070.00017.07
8.0.00.0100.01216.84
7.4.330.0050.00215.00
7.4.320.0000.00616.49
7.4.300.0000.00616.48
7.4.290.0000.00716.53
7.4.280.0030.00316.64
7.4.270.0030.00316.60
7.4.260.0000.00716.61
7.4.250.0050.00216.43
7.4.240.0020.00516.57
7.4.230.0020.00516.32
7.4.220.0130.00616.47
7.4.210.0060.01016.53
7.4.200.0030.00316.71
7.4.190.0000.00716.68
7.4.160.0040.01216.54
7.4.150.0000.01817.40
7.4.140.0100.01117.86
7.4.130.0130.00916.58
7.4.120.0090.01116.44
7.4.110.0070.01016.48
7.4.100.0100.00916.71
7.4.90.0060.01216.50
7.4.80.0130.01019.39
7.4.70.0110.00516.53
7.4.60.0090.01216.56
7.4.50.0000.00416.46
7.4.40.0140.00022.77
7.4.30.0100.00616.38
7.4.00.0020.01515.07
7.3.330.0050.00013.43
7.3.320.0020.00213.36
7.3.310.0030.00316.44
7.3.300.0000.00716.35
7.3.290.0030.01016.43
7.3.280.0110.00616.44
7.3.270.0120.00617.40
7.3.260.0090.01216.74
7.3.250.0130.00716.63
7.3.240.0120.00916.45
7.3.230.0160.00316.48
7.3.210.0110.00716.49
7.3.200.0140.00316.26
7.3.190.0060.01616.41
7.3.180.0210.00016.55
7.3.170.0080.00816.45
7.3.160.0120.00916.41
7.3.120.0070.01214.91
7.3.110.0070.01214.78
7.3.100.0050.01214.85
7.3.90.0060.00914.96
7.3.80.0030.01214.91
7.3.70.0020.01114.77
7.3.60.0070.00714.69
7.3.50.0070.00714.68
7.3.40.0080.00514.87
7.3.30.0030.00914.85
7.3.20.0030.00916.68
7.3.10.0060.00816.92
7.3.00.0080.00816.79
7.2.330.0100.00916.67
7.2.320.0090.00916.82
7.2.310.0140.00616.68
7.2.300.0060.01116.79
7.2.290.0110.00516.52
7.2.250.0120.00715.18
7.2.240.0080.01115.20
7.2.230.0030.00815.23
7.2.220.0070.00814.82
7.2.210.0110.00614.97
7.2.200.0100.00315.12
7.2.190.0110.00514.87
7.2.180.0090.00815.05
7.2.170.0070.00915.02
7.2.160.0060.00915.25
7.2.150.0100.00717.14
7.2.140.0070.01016.75
7.2.130.0130.00317.12
7.2.120.0030.00717.08
7.2.110.0030.00616.91
7.2.100.0050.00516.87
7.2.90.0060.00316.92
7.2.80.0080.00417.00
7.2.70.0110.00717.21
7.2.60.0050.01116.96
7.2.50.0090.00917.04
7.2.40.0030.01016.96
7.2.30.0040.01516.82
7.2.20.0000.01416.93
7.2.10.0060.00317.03
7.2.00.0020.01117.99
7.1.330.0050.01015.78
7.1.320.0100.00515.76
7.1.310.0060.00615.83
7.1.300.0040.00815.84
7.1.290.0050.00915.80
7.1.280.0020.01215.66
7.1.270.0000.00915.74
7.1.260.0070.00515.84
7.1.250.0080.00815.90
7.1.240.0030.00915.73
7.1.230.0060.00915.71
7.1.220.0000.01215.95
7.1.210.0030.00715.71
7.1.200.0070.00715.83
7.1.190.0100.00315.95
7.1.180.0130.00015.90
7.1.170.0000.01215.68
7.1.160.0090.00315.66
7.1.150.0040.01115.78
7.1.140.0070.00715.71
7.1.130.0070.00315.83
7.1.120.0040.00815.85
7.1.110.0080.00515.69
7.1.100.0000.01015.86
7.1.90.0100.00515.68
7.1.80.0100.00715.64
7.1.70.0050.00716.48
7.1.60.0070.01117.47
7.1.50.0090.00616.37
7.1.40.0040.01215.92
7.1.30.0060.01215.79
7.1.20.0070.00715.89
7.1.10.0090.00015.83
7.1.00.0050.04119.14
7.0.330.0000.01415.53
7.0.320.0000.01515.19
7.0.310.0090.00315.30
7.0.300.0120.00015.59
7.0.290.0030.00915.30
7.0.280.0030.01015.37
7.0.270.0060.00915.35
7.0.260.0070.00715.29
7.0.250.0030.01015.43
7.0.240.0040.01315.08
7.0.230.0030.00615.33
7.0.220.0060.01015.55
7.0.210.0070.01015.55
7.0.200.0020.01316.06
7.0.190.0090.00315.44
7.0.180.0070.00715.52
7.0.170.0000.01515.55
7.0.160.0040.00815.44
7.0.150.0060.00615.45
7.0.140.0020.04218.71
7.0.130.0110.00315.13
7.0.120.0040.01415.54
7.0.110.0090.00915.49
7.0.100.0060.00615.41
7.0.90.0090.00315.12
7.0.80.0100.00315.31
7.0.70.0070.00715.48
7.0.60.0850.03617.56
7.0.50.0130.02416.66
7.0.40.0140.03716.92
7.0.30.0200.03816.84
7.0.20.0200.04516.83
7.0.10.0030.02616.63
7.0.00.0070.04716.67
5.6.400.0090.00614.80
5.6.390.0000.00914.60
5.6.380.0040.01114.68
5.6.370.0070.00714.63
5.6.360.0030.01014.27
5.6.350.0040.01114.33
5.6.340.0030.00914.44
5.6.330.0030.00814.48
5.6.320.0070.00314.80
5.6.310.0000.01514.27
5.6.300.0040.01114.22
5.6.290.0050.00314.42
5.6.280.0130.03317.65
5.6.270.0060.00614.48
5.6.260.0070.00714.77
5.6.250.0040.00414.52
5.6.240.0070.00714.25
5.6.230.0070.00314.22
5.6.220.0040.00914.41
5.6.210.0760.04317.45
5.6.200.0020.02616.35
5.6.190.0060.02417.46
5.6.180.1560.02317.63
5.6.170.0250.03417.40
5.6.160.0050.02417.46
5.6.150.0080.02216.20
5.6.140.0100.03616.37
5.6.130.0030.03316.31
5.6.120.0080.04417.79
5.6.110.0190.03517.72
5.6.100.0070.04517.67
5.6.90.0100.04517.75
5.6.80.0040.04217.41
5.6.70.2020.02217.58
5.6.60.0070.01314.45
5.6.50.0060.00614.59
5.6.40.0040.01214.65
5.6.30.0030.00614.23
5.6.20.0030.01014.54
5.6.10.0030.01414.28
5.6.00.0040.01514.40
5.5.380.0080.00414.03
5.5.370.0060.00814.33
5.5.360.0040.00814.70
5.5.350.0170.04517.33
5.5.340.0070.03916.15
5.5.330.0050.02617.38
5.5.320.0150.03217.37
5.5.310.0180.04017.29
5.5.300.0070.03616.23
5.5.290.0050.02216.30
5.5.280.0140.02217.60
5.5.270.0090.04517.45
5.5.260.0090.04617.65
5.5.250.0070.04317.56
5.5.240.0110.02817.32
5.5.230.0140.00713.95
5.5.220.0130.00314.41
5.5.210.0070.00714.37
5.5.200.0000.01714.00
5.5.190.0100.00714.54
5.5.180.0070.00714.13
5.5.170.0030.01414.11
5.5.160.0000.01814.38
5.5.150.0100.00714.58
5.5.140.0000.01514.29
5.5.130.0040.01114.20
5.5.120.0150.00314.14
5.5.110.0090.00614.31
5.5.100.0060.00614.11
5.5.90.0100.00314.38
5.5.80.0090.00614.27
5.5.70.0030.01114.60
5.5.60.0070.01014.45
5.5.50.0030.01214.45
5.5.40.0000.01014.16
5.5.30.0090.00614.30
5.5.20.0000.01514.30
5.5.10.0030.00614.25
5.5.00.0100.00713.97
5.4.450.0080.03115.87
5.4.440.0450.03115.71
5.4.430.0430.03015.79
5.4.420.0380.03915.93
5.4.410.0370.02815.75
5.4.400.0450.02515.73
5.4.390.0440.02815.67
5.4.380.0220.02115.39
5.4.370.0100.03315.49
5.4.360.0120.03215.34
5.4.350.0200.02815.37
5.4.340.0170.02315.40
5.4.330.0040.00812.20
5.4.320.0060.02412.36
5.4.310.0100.02012.35
5.4.300.0080.02212.35
5.4.290.0130.02312.35
5.4.280.0060.02012.29
5.4.270.0070.02112.29
5.4.260.0060.02212.29
5.4.250.0060.02512.30
5.4.240.0080.01812.30
5.4.230.0060.02312.29
5.4.220.0040.02412.29
5.4.210.0060.02112.29
5.4.200.0030.02212.29
5.4.190.0050.02212.29
5.4.180.0050.02312.29
5.4.170.0070.02012.29
5.4.160.0080.01912.29
5.4.150.0040.02212.29
5.4.140.0020.02612.13
5.4.130.0050.02012.13
5.4.120.0070.02112.11
5.4.110.0050.02112.10
5.4.100.0060.02012.11
5.4.90.0100.01912.11
5.4.80.0030.02212.11
5.4.70.0040.02312.10
5.4.60.0040.02012.10
5.4.50.0030.02012.10
5.4.40.0020.02412.10
5.4.30.0060.02012.09
5.4.20.0060.02212.10
5.4.10.0030.02312.10
5.4.00.0060.02011.84
5.3.290.0110.02312.50
5.3.280.0040.02212.46
5.3.270.0040.03212.46
5.3.260.0090.01912.46
5.3.250.0060.02912.46
5.3.240.0040.02212.46
5.3.230.0040.02212.46
5.3.220.0080.02212.44
5.3.210.0070.03012.44
5.3.200.0070.03012.44
5.3.190.0080.02512.44
5.3.180.0080.02612.44
5.3.170.0060.02812.43
5.3.160.0050.02812.44
5.3.150.0040.02612.44
5.3.140.0110.01812.43
5.3.130.0040.02312.43
5.3.120.0060.02512.43
5.3.110.0070.02012.43
5.3.100.0040.02312.16
5.3.90.0040.02212.15
5.3.80.0040.02212.14
5.3.70.0050.02212.14
5.3.60.0060.01912.13
5.3.50.0020.02412.11
5.3.40.0020.02412.11
5.3.30.0050.02012.09
5.3.20.0050.02111.98
5.3.10.0060.01811.96
5.3.00.0040.02111.96
5.2.170.0030.0329.20
5.2.160.0050.0289.20
5.2.150.0030.0329.20
5.2.140.0040.0319.20
5.2.130.0040.0299.16
5.2.120.0040.0299.16
5.2.110.0050.0309.17
5.2.100.0020.0319.17
5.2.90.0050.0289.16
5.2.80.0070.0289.16
5.2.70.0060.0299.16
5.2.60.0040.0319.11
5.2.50.0040.0319.09
5.2.40.0060.0279.06
5.2.30.0040.0319.04
5.2.20.0030.0319.02
5.2.10.0040.0298.93
5.2.00.0050.0298.80
5.1.60.0030.0268.07
5.1.50.0030.0268.07
5.1.40.0070.0248.06
5.1.30.0050.0268.40
5.1.20.0070.0248.43
5.1.10.0040.0268.16
5.1.00.0040.0268.16
5.0.50.0040.0206.63
5.0.40.0030.0206.49
5.0.30.0030.0316.30
5.0.20.0040.0236.27
5.0.10.0040.0276.25
5.0.00.0050.0316.24
4.4.90.0020.0164.78
4.4.80.0020.0154.75
4.4.70.0040.0144.76
4.4.60.0030.0154.75
4.4.50.0000.0184.77
4.4.40.0030.0244.71
4.4.30.0020.0164.76
4.4.20.0030.0194.84
4.4.10.0020.0164.85
4.4.00.0030.0284.76
4.3.110.0010.0204.67
4.3.100.0050.0164.66
4.3.90.0020.0154.64
4.3.80.0030.0254.58
4.3.70.0040.0144.63
4.3.60.0020.0164.63
4.3.50.0040.0154.62
4.3.40.0050.0224.54
4.3.30.0050.0143.29
4.3.20.0030.0153.27
4.3.10.0010.0173.23
4.3.00.0030.0277.26

preferences:
39.07 ms | 401 KiB | 5 Q