3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = []; $s = microtime(true); for ($i = 0; $i < 100000; $i++) $name = $input['name'] ?? 'John'; var_dump(microtime(true)-$s); $s = microtime(true); for ($i = 0; $i < 100000; $i++) $name = isset($input['name']) ? $input['name']:'John'; var_dump(microtime(true)-$s);

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)
7.4.10.0070.01414.71
7.4.00.0000.02114.84
7.3.130.0100.01314.72
7.3.120.0080.01614.91
7.3.110.0090.01414.57
7.3.100.0090.01114.62
7.3.90.0050.01814.96
7.3.80.0100.00914.94
7.3.70.0050.01114.65
7.3.60.0050.01114.77
7.3.50.0030.01514.88
7.3.40.0080.01314.76
7.3.30.0030.01514.92
7.3.20.0060.01316.49
7.3.10.0040.01216.72
7.3.00.0030.01616.58
7.2.260.0100.01415.05
7.2.250.0100.01314.95
7.2.240.0060.01515.08
7.2.230.0040.01615.21
7.2.220.0050.01214.92
7.2.210.0030.01315.05
7.2.200.0060.01314.95
7.2.190.0060.01115.12
7.2.180.0080.01015.01
7.2.170.0050.01615.11
7.2.160.0030.01414.79
7.2.150.0060.01116.92
7.2.140.0030.01616.94
7.2.130.0070.01016.91
7.2.120.0100.01316.83
7.2.110.0020.01916.97
7.2.100.0070.01216.71
7.2.90.0070.01317.11
7.2.80.0070.01116.73
7.2.70.0110.00816.96
7.2.60.0050.01617.00
7.2.50.0050.01316.93
7.2.40.0060.01316.67
7.2.30.0050.01716.95
7.2.20.0050.01417.05
7.2.10.0050.01616.79
7.2.00.0070.01017.89
7.1.330.0050.02215.74
7.1.320.0030.02015.89
7.1.310.0020.02415.77
7.1.300.0050.02215.74
7.1.290.0080.01915.92
7.1.280.0030.02315.76
7.1.270.0070.02015.70
7.1.260.0080.02515.73
7.1.250.0030.02515.79
7.1.240.0060.02315.93
7.1.230.0000.02515.54
7.1.220.0070.02315.94
7.1.210.0030.02415.87
7.1.200.0060.02315.45
7.1.190.0030.02015.59
7.1.180.0060.01815.95
7.1.170.0030.02115.93
7.1.160.0100.01615.89
7.1.150.0040.01915.50
7.1.140.0060.01815.63
7.1.130.0100.01715.70
7.1.120.0130.01615.79
7.1.110.0090.02215.80
7.1.100.0100.01316.01
7.1.90.0030.02316.04
7.1.80.0090.01815.74
7.1.70.0050.01516.41
7.1.60.0070.02417.46
7.1.50.0110.02016.28
7.1.40.0030.02115.78
7.1.30.0000.02415.60
7.1.20.0070.02315.71
7.1.10.0070.02315.84
7.1.00.0060.05119.13
7.0.330.0030.02215.50
7.0.320.0000.02815.04
7.0.310.0100.02015.61
7.0.300.0000.02415.07
7.0.290.0070.02015.25
7.0.280.0000.02515.41
7.0.270.0100.02015.20
7.0.260.0130.01315.54
7.0.250.0070.01415.54
7.0.240.0000.02115.63
7.0.230.0030.02515.45
7.0.220.0100.01715.28
7.0.210.0090.01915.31
7.0.200.0020.02115.96
7.0.190.0070.02115.38
7.0.180.0040.01815.32
7.0.170.0030.02315.40
7.0.160.0070.02015.38
7.0.150.0030.02415.34
7.0.140.0050.05218.63
7.0.130.0030.02315.00
7.0.120.0120.01215.54
7.0.110.0030.02315.59
7.0.100.0060.02015.46
7.0.90.0030.02415.48
7.0.80.0030.02515.41
7.0.70.0030.02015.10
7.0.60.0070.05717.62
7.0.50.0020.03616.67
7.0.40.0030.04016.75
7.0.30.0130.03616.90
7.0.20.0150.03316.83
7.0.10.0060.02916.82
7.0.00.0120.05016.86
5.6.400.0090.00014.07
5.6.390.0100.00614.15
5.6.380.0030.00614.03
5.6.370.0040.01113.98
5.6.360.0120.00614.39
5.6.350.0000.01114.17
5.6.340.0030.01013.95
5.6.330.0140.00014.37
5.6.320.0090.00014.38
5.6.310.0070.00714.45
5.6.300.0000.01213.75
5.6.290.0080.00414.09
5.6.280.0050.04017.79
5.6.270.0110.00414.16
5.6.260.0110.00314.28
5.6.250.0060.00614.19
5.6.240.0000.01413.91
5.6.230.0070.00714.29
5.6.220.0030.01013.93
5.6.210.0100.04217.35
5.6.200.0050.02516.20
5.6.190.0030.03117.34
5.6.180.0150.03817.29
5.6.170.0150.04117.21
5.6.160.0030.04917.36
5.6.150.0030.02816.19
5.6.140.0050.03716.21
5.6.130.0070.04416.23
5.6.120.0070.04417.62
5.6.110.0050.02717.55
5.6.100.0120.04317.64
5.6.90.0070.04917.53
5.6.80.0090.03317.07
5.6.70.0030.01014.09
5.6.60.0030.01313.83
5.6.50.0000.01414.05
5.6.40.0100.00014.00
5.6.30.0040.00714.00
5.6.20.0120.00414.11
5.6.10.0090.00613.87
5.6.00.0030.01314.07
5.5.380.0100.00314.03
5.5.370.0040.01114.09
5.5.360.0110.00413.81
5.5.350.0080.04217.20
5.5.340.0050.03215.82
5.5.330.0080.02217.06
5.5.320.0050.03017.04
5.5.310.0210.02317.22
5.5.300.0120.03916.03
5.5.290.0050.03415.86
5.5.280.0050.04517.27
5.5.270.0110.04517.54
5.5.260.0090.04217.37
5.5.250.0040.04717.24
5.5.240.0110.03916.96
5.5.230.0000.01413.84
5.5.220.0100.00313.82
5.5.210.0100.00614.10
5.5.200.0090.00013.93
5.5.190.0040.00814.19
5.5.180.0070.01113.80
5.5.170.0070.01013.57
5.5.160.0000.01413.84
5.5.150.0030.00614.25
5.5.140.0080.00813.81
5.5.130.0030.01414.09
5.5.120.0060.01213.56
5.5.110.0040.01114.00
5.5.100.0130.00313.97
5.5.90.0000.01413.92
5.5.80.0040.00813.99
5.5.70.0120.00314.03
5.5.60.0030.00613.64
5.5.50.0030.00913.88
5.5.40.0000.01314.19
5.5.30.0030.00913.99
5.5.20.0040.01013.62
5.5.10.0080.00614.31
5.5.00.0030.01013.67
5.4.450.0270.02615.35
5.4.440.0250.02315.27
5.4.430.0390.02115.27
5.4.420.0150.02515.32
5.4.410.0140.01715.27
5.4.400.0230.02015.27
5.4.390.0170.02515.27
5.4.380.0170.03114.84
5.4.370.0320.02514.92
5.4.360.0170.03914.84
5.4.350.0250.02614.93
5.4.340.0250.03714.86
5.4.330.0000.00611.09
5.4.320.0080.01811.79
5.4.310.0040.02611.79
5.4.300.0070.02111.79
5.4.290.0040.02811.79
5.4.280.0060.02511.74
5.4.270.0060.02111.74
5.4.260.0030.02411.74
5.4.250.0040.02211.74
5.4.240.0070.02011.74
5.4.230.0090.02111.73
5.4.220.0060.02111.73
5.4.210.0010.02411.73
5.4.200.0050.02011.73
5.4.190.0070.02211.73
5.4.180.0070.01911.73
5.4.170.0050.02111.73
5.4.160.0110.01611.73
5.4.150.0060.02111.73
5.4.140.0070.02111.58
5.4.130.0050.02211.57
5.4.120.0080.02011.55
5.4.110.0050.01911.55
5.4.100.0090.01811.55
5.4.90.0030.02411.55
5.4.80.0030.02311.55
5.4.70.0040.02011.54
5.4.60.0030.02211.54
5.4.50.0060.01911.54
5.4.40.0050.01911.54
5.4.30.0070.02011.54
5.4.20.0060.02211.54
5.4.10.0020.02311.54
5.4.00.0020.02711.29
5.3.290.0060.03912.80
5.3.280.0060.04612.71
5.3.270.0050.04312.72
5.3.260.0070.03712.72
5.3.250.0050.03612.72
5.3.240.0050.03712.72
5.3.230.0060.03712.71
5.3.220.0090.03212.68
5.3.210.0090.04512.68
5.3.200.0070.04012.68
5.3.190.0080.04512.68
5.3.180.0080.03812.67
5.3.170.0080.03912.67
5.3.160.0100.04012.67
5.3.150.0050.04512.67
5.3.140.0050.04112.66
5.3.130.0100.03612.66
5.3.120.0070.04412.66
5.3.110.0100.03912.66
5.3.100.0120.03412.12
5.3.90.0100.04012.08
5.3.80.0120.04112.07
5.3.70.0050.04212.07
5.3.60.0040.03912.06
5.3.50.0040.04012.00
5.3.40.0070.04112.00
5.3.30.0090.03511.95
5.3.20.0060.03811.72
5.3.10.0090.03611.70
5.3.00.0080.03311.68
5.2.170.0040.0329.18
5.2.160.0040.0339.18
5.2.150.0060.0319.18
5.2.140.0050.0329.18
5.2.130.0060.0379.14
5.2.120.0030.0349.14
5.2.110.0070.0349.14
5.2.100.0060.0319.14
5.2.90.0030.0349.14
5.2.80.0060.0339.14
5.2.70.0050.0399.14
5.2.60.0040.0469.09
5.2.50.0080.0269.05
5.2.40.0080.0349.03
5.2.30.0040.0349.01
5.2.20.0090.0319.00
5.2.10.0010.0338.93
5.2.00.0030.0328.78
5.1.60.0050.0308.07
5.1.50.0050.0338.06
5.1.40.0080.0248.05
5.1.30.0080.0268.40
5.1.20.0050.0348.42
5.1.10.0060.0298.14
5.1.00.0070.0248.14
5.0.50.0010.0226.62
5.0.40.0030.0206.48
5.0.30.0030.0316.29
5.0.20.0050.0196.26
5.0.10.0050.0186.23
5.0.00.0050.0296.23
4.4.90.0050.0144.78
4.4.80.0050.0204.76
4.4.70.0040.0204.75
4.4.60.0040.0174.75
4.4.50.0000.0214.77
4.4.40.0030.0284.71
4.4.30.0050.0174.76
4.4.20.0040.0174.84
4.4.10.0020.0184.84
4.4.00.0040.0254.76
4.3.110.0010.0194.67
4.3.100.0020.0154.66
4.3.90.0040.0234.63
4.3.80.0030.0274.58
4.3.70.0050.0124.63
4.3.60.0070.0114.63
4.3.50.0020.0174.63
4.3.40.0020.0254.53
4.3.30.0020.0153.29
4.3.20.0000.0173.26
4.3.10.0030.0143.22
4.3.00.0030.02019.45

preferences:
34.11 ms | 401 KiB | 5 Q