3v4l.org

run code in 300+ PHP versions simultaneously
// PHP 5.0 or later: $array = []; var_dump(empty($array)); // outputs bool(true) $array = new ArrayObject(); var_dump(empty($array)); // outputs bool(false) // why don't these both produce the same output?<?php

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.0040.01118.43
8.3.50.0080.01221.98
8.3.40.0140.00018.57
8.3.30.0100.00318.97
8.3.20.0050.00220.26
8.3.10.0040.00421.77
8.3.00.0090.00017.91
8.2.180.0070.00716.32
8.2.170.0140.00022.96
8.2.160.0070.00720.38
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0070.00021.00
8.2.110.0000.00922.15
8.2.100.0120.00017.49
8.2.90.0040.00419.17
8.2.80.0080.00017.97
8.2.70.0060.00317.50
8.2.60.0000.00817.80
8.2.50.0060.00318.07
8.2.40.0040.00418.09
8.2.30.0000.00717.73
8.2.20.0050.00317.46
8.2.10.0050.00218.00
8.2.00.0080.00017.41
8.1.280.0070.00725.92
8.1.270.0090.00021.95
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00623.83
8.1.230.0140.00018.99
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0040.00417.23
8.1.190.0040.00417.10
8.1.180.0050.00318.10
8.1.170.0000.00718.46
8.1.160.0000.00721.91
8.1.150.0040.00418.73
8.1.140.0000.00817.25
8.1.130.0070.00017.71
8.1.120.0040.00417.38
8.1.110.0000.00817.21
8.1.100.0050.00317.33
8.1.90.0040.00417.32
8.1.80.0050.00217.29
8.1.70.0030.00317.29
8.1.60.0000.00817.32
8.1.50.0060.00317.42
8.1.40.0060.00317.27
8.1.30.0050.00317.49
8.1.20.0040.00417.33
8.1.10.0040.00417.41
8.1.00.0070.00017.45
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0030.00518.43
8.0.270.0030.00317.11
8.0.260.0000.00717.16
8.0.250.0000.00816.78
8.0.240.0030.00316.79
8.0.230.0070.00016.71
8.0.220.0000.00816.79
8.0.210.0070.00016.71
8.0.200.0000.00616.82
8.0.190.0040.00416.70
8.0.180.0070.00016.76
8.0.170.0070.00016.76
8.0.160.0000.00716.77
8.0.150.0040.00416.61
8.0.140.0030.00316.71
8.0.130.0000.00713.12
8.0.120.0030.00516.63
8.0.110.0000.00816.72
8.0.100.0050.00216.55
8.0.90.0000.00716.80
8.0.80.0000.01416.75
8.0.70.0030.00416.73
8.0.60.0040.00416.57
8.0.50.0000.00716.64
8.0.30.0070.01516.74
8.0.20.0110.00817.40
8.0.10.0040.00416.72
8.0.00.0080.00916.56
7.4.330.0060.00015.00
7.4.320.0040.00416.43
7.4.300.0060.00316.28
7.4.290.0030.00316.38
7.4.280.0000.00816.36
7.4.270.0040.00416.50
7.4.260.0030.00316.35
7.4.250.0040.00416.43
7.4.240.0050.00216.40
7.4.230.0030.00316.37
7.4.220.0120.00616.49
7.4.210.0100.00316.31
7.4.200.0030.00316.35
7.4.160.0090.00616.39
7.4.150.0070.01017.40
7.4.140.0100.00817.86
7.4.130.0140.00516.30
7.4.120.0050.01216.41
7.4.110.0080.00816.33
7.4.100.0120.00616.11
7.4.90.0060.01216.22
7.4.80.0070.01119.39
7.4.70.0120.00616.22
7.4.60.0130.00316.16
7.4.50.0000.00816.20
7.4.40.0060.01116.47
7.4.30.0100.00716.43
7.3.330.0030.00312.99
7.3.320.0020.00213.10
7.3.310.0070.00016.18
7.3.300.0000.00716.10
7.3.290.0040.01116.08
7.3.280.0080.00816.17
7.3.270.0100.00717.40
7.3.260.0130.00616.39
7.3.250.0110.00616.39
7.3.240.0070.01016.27
7.3.230.0090.00816.39
7.3.210.0110.01116.05
7.3.200.0100.00819.39
7.3.190.0060.00916.22
7.3.180.0140.00316.36
7.3.170.0120.00316.27
7.3.160.0100.00616.25
7.2.330.0060.01316.51
7.2.320.0040.01116.31
7.2.310.0110.00516.55
7.2.300.0100.00716.31
7.2.290.0110.01116.51
5.4.310.0730.03019.13
5.4.300.0470.04319.04
5.4.290.0370.04719.05
5.4.280.0430.04319.10
5.4.270.0830.04319.16
5.4.260.0270.05019.06
5.4.250.0500.03019.05
5.4.240.0770.03319.24
5.4.230.0470.03719.13
5.4.220.0330.05019.07
5.4.210.0330.04019.08
5.4.200.0700.02018.94
5.4.190.0270.04019.17
5.4.180.0330.04318.75
5.4.170.0730.03719.17
5.4.160.0730.04019.16
5.4.150.0400.06319.16
5.4.140.0400.03316.38
5.4.130.0470.04716.26
5.4.120.0500.03716.16
5.4.110.0330.03016.21
5.4.100.0570.04016.29
5.4.90.0530.04316.41
5.4.80.0400.04016.44
5.4.70.0600.03316.22
5.4.60.0630.03316.33
5.4.50.0370.04316.45
5.4.40.0530.03716.25
5.4.30.0830.04016.38
5.4.20.0500.03716.29
5.4.10.0700.04316.22
5.4.00.0770.03015.67
5.3.290.0430.04014.50
5.3.280.0370.03314.46
5.3.270.0870.03314.46
5.3.260.0370.04014.55
5.3.250.0470.04314.45
5.3.240.0230.04314.44
5.3.230.0330.03314.42
5.3.220.0830.03714.43
5.3.210.0630.04314.40
5.3.200.0570.04014.65
5.3.190.0330.03714.53
5.3.180.0670.04314.49
5.3.170.0300.04014.50
5.3.160.0570.03714.40
5.3.150.0830.04014.65
5.3.140.0530.03314.64
5.3.130.0330.03714.49
5.3.120.0870.02314.50
5.3.110.0730.03714.39
5.3.100.0500.03713.88
5.3.90.0770.04313.98
5.3.80.0400.03013.96
5.3.70.0430.04013.82
5.3.60.0270.03713.96
5.3.50.0630.02713.89
5.3.40.0930.04013.90
5.3.30.0500.03313.84
5.3.20.0500.03313.64
5.3.10.0370.03713.64
5.3.00.0700.04013.57
5.2.170.0330.02712.22
5.2.160.0470.03012.22
5.2.150.0770.03312.22
5.2.140.0430.03012.22
5.2.130.0630.03312.22
5.2.120.0530.02312.22
5.2.110.0400.04012.22
5.2.100.0530.03712.22
5.2.90.0230.03012.22
5.2.80.0530.02012.22
5.2.70.0730.02312.22
5.2.60.0630.02312.22
5.2.50.0330.04012.22
5.2.40.0170.03712.22
5.2.30.0400.02712.22
5.2.20.0330.03012.22
5.2.10.0530.02312.22
5.2.00.0570.04012.22
5.1.60.0330.02712.22
5.1.50.0300.03312.22
5.1.40.0500.02712.22
5.1.30.0470.03312.22
5.1.20.0270.03312.22
5.1.10.0030.03012.22
5.1.00.0100.04012.22
5.0.50.0370.01312.22
5.0.40.0100.02312.22
5.0.30.0270.02712.22
5.0.20.0230.01712.22
5.0.10.0130.02012.22
5.0.00.0170.03012.22
4.4.90.0230.01312.22
4.4.80.0200.01312.22
4.4.70.0070.01712.22
4.4.60.0300.01312.22
4.4.50.0130.01712.22
4.4.40.0300.02012.22
4.4.30.0230.01712.22
4.4.20.0230.01712.22
4.4.10.0330.02012.22
4.4.00.0100.03312.22
4.3.110.0200.01012.22
4.3.100.0370.01712.22
4.3.90.0300.01312.22
4.3.80.0200.02712.22
4.3.70.0030.01312.22
4.3.60.0170.01712.22
4.3.50.0130.01712.22
4.3.40.0370.02012.22
4.3.30.0170.01712.22
4.3.20.0030.02012.22
4.3.10.0200.02712.22
4.3.00.0030.02012.21

preferences:
36.84 ms | 401 KiB | 5 Q