3v4l.org

run code in 300+ PHP versions simultaneously
<?php class fakePDO { } class DatabaseConnection { protected $connection; public function __construct() { $connection = new fakePDO(); } public function __destruct() { unset($this->connection); } } class Database { static $connections = array(); public static function open($key) { self::$connections[$key] = new DatabaseConnection(); } public static function close($key) { unset(self::$connections[$key]); gc_collect_cycles(); } } Database::open('a'); Database::open('b'); Database::close('a'); debug_zval_dump(Database::$connections);

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.0110.00716.75
8.3.60.0070.01416.63
8.3.50.0170.00318.14
8.3.40.0090.00618.58
8.3.30.0030.01218.68
8.3.20.0000.00824.18
8.3.10.0040.00424.66
8.3.00.0070.00026.16
8.2.190.0090.00616.75
8.2.180.0100.01025.92
8.2.170.0140.00322.96
8.2.160.0040.01122.96
8.2.150.0100.00325.66
8.2.140.0000.00724.66
8.2.130.0050.00226.16
8.2.120.0080.00026.35
8.2.110.0090.00021.00
8.2.100.0090.00317.72
8.2.90.0030.00617.63
8.2.80.0080.00018.91
8.2.70.0040.00417.63
8.2.60.0030.00617.93
8.2.50.0040.00418.05
8.2.40.0030.00519.95
8.2.30.0080.00018.14
8.2.20.0000.00717.97
8.2.10.0040.00419.12
8.2.00.0030.00519.29
8.1.280.0100.00725.92
8.1.270.0040.00423.99
8.1.260.0070.00028.09
8.1.250.0040.00428.09
8.1.240.0070.00717.25
8.1.230.0000.01220.90
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0080.00017.23
8.1.190.0050.00317.35
8.1.180.0050.00518.10
8.1.170.0030.00518.50
8.1.160.0070.00018.93
8.1.150.0060.00518.88
8.1.140.0040.00418.82
8.1.130.0030.00317.26
8.1.120.0050.00317.25
8.1.110.0040.00417.33
8.1.100.0040.00417.41
8.1.90.0040.00417.36
8.1.80.0040.00417.23
8.1.70.0030.00617.39
8.1.60.0000.00817.62
8.1.50.0030.00617.41
8.1.40.0000.00917.53
8.1.30.0080.00317.54
8.1.20.0070.00017.52
8.1.10.0080.00017.59
8.1.00.0060.00317.48
8.0.300.0030.00718.77
8.0.290.0040.00416.75
8.0.280.0000.00718.39
8.0.270.0000.00718.02
8.0.260.0030.00316.70
8.0.250.0000.00716.92
8.0.240.0030.00316.88
8.0.230.0000.00716.79
8.0.220.0030.00316.86
8.0.210.0070.00016.83
8.0.200.0030.00616.84
8.0.190.0000.00716.79
8.0.180.0040.00416.76
8.0.170.0050.00316.87
8.0.160.0040.00416.85
8.0.150.0040.00416.81
8.0.140.0070.00016.68
8.0.130.0030.00313.19
8.0.120.0030.00616.79
8.0.110.0030.00516.83
8.0.100.0070.00016.93
8.0.90.0070.00016.75
8.0.80.0060.01216.78
8.0.70.0040.00416.83
8.0.60.0000.00716.72
8.0.50.0050.00316.70
8.0.30.0080.01316.88
8.0.20.0160.00916.90
8.0.10.0110.00916.91
8.0.00.0130.01216.98
7.4.330.0000.00615.55
7.4.320.0060.00016.52
7.4.300.0000.00616.64
7.4.290.0000.00716.40
7.4.280.0070.00016.54
7.4.270.0040.00416.60
7.4.260.0030.00313.33
7.4.250.0060.00316.38
7.4.240.0030.00316.52
7.4.230.0080.00016.58
7.4.220.0030.00416.61
7.4.210.0080.00916.56
7.4.200.0070.00016.55
7.4.160.0160.00816.59
7.4.150.0100.01316.57
7.4.140.0130.00816.39
7.4.130.0070.01016.50
7.4.120.0110.00616.43
7.4.110.0120.00516.52
7.4.100.0110.01016.52
7.4.90.0120.01016.43
7.4.80.0100.01316.38
7.4.70.0130.00416.50
7.4.60.0120.00616.41
7.4.50.0050.01316.40
7.4.40.0120.00816.44
7.4.30.0040.01416.48
7.4.20.0070.01216.45
7.4.10.0070.00916.38
7.4.00.0050.01116.52
7.3.330.0070.00016.41
7.3.320.0000.00613.30
7.3.310.0070.00016.38
7.3.300.0030.00316.41
7.3.290.0080.00916.37
7.3.270.0120.01416.34
7.3.260.0090.00816.35
7.3.250.0100.00616.31
7.3.240.0120.00416.36
7.3.230.0090.01016.38
7.3.220.0120.00916.29
7.3.210.0080.01516.28
7.3.200.0120.00716.30
7.3.190.0090.01016.29
7.3.180.0090.00816.29
7.3.170.0060.01216.29
7.3.160.0080.00916.36
7.3.150.0120.00716.23
7.3.140.0080.00916.26
7.3.130.0080.00916.36
7.3.120.0150.00516.33
7.3.110.0190.01016.23
7.3.100.0090.01116.18
7.3.90.0100.00616.50
7.3.80.0130.00616.28
7.3.70.0060.01316.42
7.3.60.0050.01216.47
7.3.50.0140.00616.46
7.3.40.0100.00816.48
7.3.30.0140.00716.44
7.3.20.0150.00516.46
7.3.10.0100.01116.44
7.3.00.0110.00816.45
7.2.340.0200.01316.31
7.2.330.0310.00916.38
7.2.320.0140.01416.38
7.2.310.0190.00716.35
7.2.300.0210.01216.34
7.2.290.0210.00916.28
7.2.280.0170.01016.41
7.2.270.0120.02016.37
7.2.260.0180.01116.34
7.2.250.0250.00516.31
7.2.240.0210.00816.38
7.2.230.0240.00416.33
7.2.220.0210.00916.36
7.2.210.0250.00316.37
7.2.200.0200.01016.54
7.2.190.0280.00616.42
7.2.180.0220.01116.46
7.2.170.0210.01016.49
7.2.160.0210.00916.49
7.2.150.0420.00716.53
7.2.140.0200.01116.56
7.2.130.0210.01016.68
7.2.120.0210.01016.58
7.2.110.0210.01216.64
7.2.100.0160.01216.55
7.2.90.0250.00916.50
7.2.80.0170.01516.58
7.2.70.0240.00716.52
7.2.60.0310.00916.48
7.2.50.0200.01316.47
7.2.40.0210.01116.56
7.2.30.0260.00416.51
7.2.20.0200.01116.72
7.2.10.0210.01016.66
7.2.00.0190.00916.66
7.1.330.0280.00715.54
7.1.320.0160.01015.62
7.1.310.0210.01115.67
7.1.300.0180.01015.64
7.1.290.0230.00615.61
7.1.280.0180.01015.65
7.1.270.0260.01215.59
7.1.260.0180.01315.61
7.1.250.0170.01115.43
7.1.240.0210.00915.52
7.1.230.0200.00715.52
7.1.220.0210.00915.59
7.1.210.0210.00815.60
7.1.200.0200.00815.59
7.1.190.0220.00915.54
7.1.180.0160.01015.51
7.1.170.0190.01215.57
7.1.160.0280.01015.54
7.1.150.0180.00915.52
7.1.140.0150.01115.53
7.1.130.0150.01115.48
7.1.120.0180.00715.49
7.1.110.0260.00515.48
7.1.100.0190.00715.43
7.1.90.0220.00815.46
7.1.80.0190.01215.53
7.1.70.0420.00815.35
7.1.60.0190.01015.49
7.1.50.0160.01415.51
7.1.40.0160.01115.53
7.1.30.0280.00615.62
7.1.20.0280.00715.45
7.1.10.0170.00915.46
7.1.00.0180.00915.48
7.0.330.0220.00815.24
7.0.320.0220.00815.23
7.0.310.0280.00715.21
7.0.300.0220.00615.23
7.0.290.0190.00615.23
7.0.280.0310.00115.24
7.0.270.0230.00515.25
7.0.260.0190.00615.29
7.0.250.0140.01415.30
7.0.240.0140.01115.29
7.0.230.0230.00715.25
7.0.220.0190.01215.21
7.0.210.0120.01215.23
7.0.200.0200.00715.21
7.0.190.0150.01215.22
7.0.180.0240.00615.25
7.0.170.0160.01015.33
7.0.160.0210.01015.10
7.0.150.0640.00115.19
7.0.140.0140.01215.16
7.0.130.0180.00815.20
7.0.120.0130.01015.21
7.0.110.0240.00815.19
7.0.100.0160.01315.21
7.0.90.0210.00615.17
7.0.80.0390.00915.10
7.0.70.0220.00415.20
7.0.60.0210.00615.20
7.0.50.0180.00915.21
7.0.40.0220.00915.34
7.0.30.0200.01215.29
7.0.20.0130.01115.16
7.0.10.0240.00915.26
7.0.00.0150.01115.25
5.6.400.0210.00715.94
5.6.390.0180.00915.92
5.6.380.0220.00815.93
5.6.370.0180.00915.97
5.6.360.0270.00715.88
5.6.350.0180.01215.98
5.6.340.0180.00815.95
5.6.330.0210.00616.02
5.6.320.0220.01016.05
5.6.310.0180.00916.06
5.6.300.0190.01015.90
5.6.290.0180.00915.97
5.6.280.0150.01115.98
5.6.270.0240.00616.02
5.6.260.0130.01615.94
5.6.250.0190.01015.85
5.6.240.0180.00816.00
5.6.230.0150.01215.99
5.6.220.0120.01716.08
5.6.210.0170.01615.98
5.6.200.0210.01116.23
5.6.190.0170.01416.13
5.6.180.0180.00916.06
5.6.170.0200.01016.18
5.6.160.0160.01216.14
5.6.150.0130.01516.12
5.6.140.0180.01516.07
5.6.130.0180.01416.10
5.6.120.0200.01516.03
5.6.110.0170.01215.92
5.6.100.0170.01215.96
5.6.90.0230.00815.93
5.6.80.0180.00615.96
5.6.70.0170.00715.99
5.6.60.0190.01116.04
5.6.50.0210.01215.90
5.6.40.0110.01416.04
5.6.30.0200.00615.98
5.6.20.0150.01115.90
5.6.10.0110.01615.98
5.6.00.0130.01615.96
5.5.380.0190.01415.93
5.5.370.0190.00715.99
5.5.360.0210.01315.92
5.5.350.0190.01115.90
5.5.340.0270.01215.91
5.5.330.0140.01515.84
5.5.320.0090.01715.81
5.5.310.0210.01015.76
5.5.300.0240.00715.81
5.5.290.0220.00815.82
5.5.280.0190.00715.94
5.5.270.0310.01015.85
5.5.260.0170.01515.90
5.5.250.0190.00816.07
5.5.240.0190.00916.00
5.5.230.0210.01015.94
5.5.220.0140.01115.95
5.5.210.0200.01116.05
5.5.200.0160.00915.83
5.5.190.0120.01715.73
5.5.180.0130.01615.82
5.5.170.0130.01215.73
5.5.160.0150.01515.74
5.5.150.0200.01115.69
5.5.140.0200.01115.66
5.5.130.0170.01315.64
5.5.120.0260.01615.74
5.5.110.0170.01015.78
5.5.100.0130.01416.11
5.5.90.0190.00916.03
5.5.80.0140.01316.01
5.5.70.0140.01216.07
5.5.60.0150.01415.99
5.5.50.0160.00815.95
5.5.40.0200.01515.95
5.5.30.0100.01816.01
5.5.20.0180.01115.93
5.5.10.0120.01415.90
5.5.00.0220.01215.82
5.4.450.0150.00712.82
5.4.440.0130.00512.79
5.4.430.0130.01012.77
5.4.420.0160.00612.80
5.4.410.0110.00812.78
5.4.400.0120.00712.83
5.4.390.0120.00712.64
5.4.380.0170.00612.76
5.4.370.0100.00912.77
5.4.360.0140.00612.64
5.4.350.0140.00912.69
5.4.340.0140.00712.75
5.4.330.0170.00912.77
5.4.320.0170.01012.87
5.4.310.0110.00912.83
5.4.300.0140.00912.80
5.4.290.0120.00912.89
5.4.280.0130.00912.85
5.4.270.0170.00712.75
5.4.260.0120.01012.74
5.4.250.0140.00912.76
5.4.240.0160.00612.68
5.4.230.0160.00712.55
5.4.220.0150.00612.52
5.4.210.0170.00912.57
5.4.200.0110.00912.65
5.4.190.0120.00912.60
5.4.180.0160.00512.59
5.4.170.0160.00512.58
5.4.160.0180.00512.62
5.4.150.0160.00612.70
5.4.140.0160.00512.78
5.4.130.0140.00812.81
5.4.120.0160.00812.79
5.4.110.0100.01112.72
5.4.100.0100.00912.78
5.4.90.0180.00712.83
5.4.80.0130.00912.89
5.4.70.0110.00712.86
5.4.60.0130.00912.85
5.4.50.0120.00812.78
5.4.40.0120.01012.77
5.4.30.0140.00712.85
5.4.20.0100.00912.90
5.4.10.0170.00212.84
5.4.00.0130.00912.59
5.3.290.0140.01113.14
5.3.280.0130.00712.96
5.3.270.0120.01013.18
5.3.260.0150.00913.24
5.3.250.0180.00613.09
5.3.240.0140.00912.98
5.3.230.0100.01313.01
5.3.220.0100.01312.97
5.3.210.0130.01013.11
5.3.200.0120.01013.05
5.3.190.0120.00913.26
5.3.180.0120.00913.26
5.3.170.0160.00913.17
5.3.160.0110.01013.25
5.3.150.0110.01313.24
5.3.140.0100.01413.24
5.3.130.0090.01213.02
5.3.120.0150.00713.03
5.3.110.0160.00613.13
5.3.100.0120.00913.11
5.3.90.0120.00913.20
5.3.80.0130.01013.07
5.3.70.0130.00913.05
5.3.60.0130.00913.18
5.3.50.0160.00813.15
5.3.40.0160.00813.11
5.3.30.0210.01213.07
5.3.20.0150.00812.99
5.3.10.0140.01012.84
5.3.00.0180.00612.89
5.2.170.0180.00912.08
5.2.160.0060.01412.04
5.2.150.0140.00612.15
5.2.140.0110.01012.08
5.2.130.0080.01112.06
5.2.120.0100.00812.19
5.2.110.0100.01111.99
5.2.100.0130.00812.07
5.2.90.0120.00712.10
5.2.80.0100.01011.86
5.2.70.0090.00811.92
5.2.60.0060.01311.81
5.2.50.0130.00711.94
5.2.40.0180.00912.04
5.2.30.0120.01012.04
5.2.20.0100.01011.92
5.2.10.0100.01011.71
5.2.00.0110.00611.60
5.1.60.0100.00811.00
5.1.50.0130.00511.04
5.1.40.0200.00211.08
5.1.30.0120.00611.10
5.1.20.0140.00511.16
5.1.10.0100.00711.18
5.1.00.0110.00510.92
5.0.50.0070.00610.60
5.0.40.0080.00610.60
5.0.30.0040.01010.60
5.0.20.0060.00610.60
5.0.10.0080.00410.60
5.0.00.0060.00810.60
4.4.90.0040.00510.60
4.4.80.0050.00510.60
4.4.70.0080.00110.60
4.4.60.0000.00910.60
4.4.50.0080.00310.60
4.4.40.0080.00110.60
4.4.30.0040.00510.60
4.4.20.0050.00410.60
4.4.10.0070.00310.60
4.4.00.0070.00410.60
4.3.110.0070.00110.60
4.3.100.0000.00710.60
4.3.90.0070.00210.60
4.3.80.0060.00210.60
4.3.70.0060.00210.60
4.3.60.0050.00410.60
4.3.50.0090.00010.60
4.3.40.0030.00510.60
4.3.30.0020.00510.60
4.3.20.0030.00310.60
4.3.10.0050.00210.60
4.3.00.0040.00410.60

preferences:
65.64 ms | 401 KiB | 5 Q