3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = []; $s = microtime(true); for ($i = 0; $i < 1000000; $i++) $name = isset($input['name']) ? $input['name']:'John'; var_dump(microtime(true)-$s); $s = microtime(true); for ($i = 0; $i < 1000000; $i++) $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.00.0000.05814.97
7.3.120.0070.05514.98
7.3.110.0130.06714.82
7.3.100.0030.07614.79
7.3.90.0030.05515.07
7.3.80.0000.05414.98
7.3.70.0070.05314.53
7.3.60.0000.05514.85
7.3.50.0030.04614.79
7.3.40.0070.05414.64
7.3.30.0060.06114.91
7.3.20.0000.05816.71
7.3.10.0030.05616.63
7.3.00.0030.05616.77
7.2.250.0030.07914.93
7.2.240.0100.04914.97
7.2.230.0000.05715.20
7.2.220.0000.05615.05
7.2.210.0130.04915.26
7.2.200.0000.07615.20
7.2.190.0030.06514.96
7.2.180.0100.05015.28
7.2.170.0030.05314.86
7.2.160.0100.05115.07
7.2.150.0100.04616.84
7.2.140.0030.05116.66
7.2.130.0100.05416.64
7.2.120.0030.04816.95
7.2.110.0030.05316.85
7.2.100.0030.05316.89
7.2.90.0000.05016.85
7.2.80.0030.05116.80
7.2.70.0100.04516.87
7.2.60.0030.05717.08
7.2.50.0070.05316.99
7.2.40.0030.05116.73
7.2.30.0070.04616.89
7.2.20.0000.05617.21
7.2.10.0000.05116.85
7.2.00.0020.05118.26
7.1.330.0060.14315.74
7.1.320.0030.13815.68
7.1.310.0070.13215.92
7.1.300.0070.13015.56
7.1.290.0030.13015.63
7.1.280.0070.13315.75
7.1.270.0070.12915.67
7.1.260.0000.13915.78
7.1.250.0100.13215.92
7.1.240.0070.13615.91
7.1.230.0100.12715.77
7.1.220.0100.12715.55
7.1.210.0030.13315.59
7.1.200.0070.13315.72
7.1.190.0030.16415.93
7.1.180.0100.14215.97
7.1.170.0070.15915.93
7.1.160.0030.14015.58
7.1.150.0000.13915.54
7.1.140.0000.14815.98
7.1.130.0030.14315.61
7.1.120.0030.13415.60
7.1.110.0070.13615.86
7.1.100.0030.13215.64
7.1.90.0000.13615.85
7.1.80.0070.13115.77
7.1.70.0030.08616.42
7.1.60.0070.12217.56
7.1.50.0080.08916.31
7.1.40.0030.14215.98
7.1.30.0100.12915.90
7.1.20.0070.14115.55
7.1.10.0070.13815.96
7.1.00.0030.13819.06
7.0.330.0030.14115.38
7.0.320.0070.13915.36
7.0.310.0000.15215.34
7.0.300.0070.13415.24
7.0.290.0070.12815.30
7.0.280.0030.13115.32
7.0.270.0000.13215.34
7.0.260.0100.12815.37
7.0.250.0030.13515.62
7.0.240.0000.14715.41
7.0.230.0030.14115.19
7.0.220.0000.14715.32
7.0.210.0000.14615.52
7.0.200.0030.10316.00
7.0.190.0000.16215.42
7.0.180.0030.15115.17
7.0.170.0030.15615.10
7.0.160.0070.14015.46
7.0.150.0100.13115.48
7.0.140.0050.13218.68
7.0.130.0070.12815.54
7.0.120.0030.13415.25
7.0.110.0030.14215.15
7.0.100.0030.13015.42
7.0.90.0070.13215.47
7.0.80.0100.12915.42
7.0.70.0030.13815.46
7.0.60.0120.12917.69
7.0.50.0070.12816.48
7.0.40.0080.13216.73
7.0.30.0170.12916.64
7.0.20.0220.11916.68
7.0.10.0050.10616.89
7.0.00.0100.13016.76
5.6.400.0030.01114.02
5.6.390.0000.00813.82
5.6.380.0040.00814.09
5.6.370.0030.00514.09
5.6.360.0000.00814.21
5.6.350.0000.01214.16
5.6.340.0090.00014.15
5.6.330.0030.00814.02
5.6.320.0030.01013.66
5.6.310.0120.00014.14
5.6.300.0030.00714.00
5.6.290.0000.01114.30
5.6.280.0060.04517.50
5.6.270.0000.00814.35
5.6.260.0080.00414.09
5.6.250.0000.01514.09
5.6.240.0070.00013.96
5.6.230.0000.01014.29
5.6.220.0000.01214.25
5.6.210.0050.02517.28
5.6.200.0050.02316.12
5.6.190.0070.02217.42
5.6.180.0250.03517.35
5.6.170.0150.03717.23
5.6.160.0050.04417.38
5.6.150.0120.03316.21
5.6.140.0020.03216.30
5.6.130.0030.04016.28
5.6.120.0020.02517.52
5.6.110.0050.02317.58
5.6.100.0060.03917.43
5.6.90.0120.04317.65
5.6.80.0070.04417.28
5.6.70.0080.00314.12
5.6.60.0090.00314.04
5.6.50.0060.00614.15
5.6.40.0060.00914.05
5.6.30.0070.00314.04
5.6.20.0060.00613.74
5.6.10.0090.00313.95
5.6.00.0040.00714.12
5.5.380.0000.00814.04
5.5.370.0030.00614.38
5.5.360.0100.00613.94
5.5.350.0050.01817.13
5.5.340.0040.02316.10
5.5.330.0060.02617.27
5.5.320.0040.04917.16
5.5.310.0170.03317.41
5.5.300.0070.02716.08
5.5.290.0040.04516.03
5.5.280.0050.02317.36
5.5.270.0020.04317.37
5.5.260.0030.02517.60
5.5.250.0070.03017.40
5.5.240.0120.04017.11
5.5.230.0030.01013.98
5.5.220.0040.00713.72
5.5.210.0060.01213.99
5.5.200.0070.00713.84
5.5.190.0160.00014.08
5.5.180.0110.00013.93
5.5.170.0080.00013.95
5.5.160.0040.01113.77
5.5.150.0090.00613.75
5.5.140.0030.01213.95
5.5.130.0000.01314.03
5.5.120.0080.00613.70
5.5.110.0060.00614.14
5.5.100.0110.00314.17
5.5.90.0040.01214.15
5.5.80.0030.00614.02
5.5.70.0070.00713.84
5.5.60.0040.00713.79
5.5.50.0040.00413.86
5.5.40.0100.00314.11
5.5.30.0130.00313.95
5.5.20.0000.01414.20
5.5.10.0060.00613.94
5.5.00.0080.00013.85
5.4.450.0200.02016.16
5.4.440.0160.02416.16
5.4.430.0270.01816.16
5.4.420.0090.02216.16
5.4.410.0250.02516.16
5.4.400.0160.02416.16
5.4.390.0200.02316.16
5.4.380.0260.02915.73
5.4.370.0200.04215.81
5.4.360.0170.02815.82
5.4.350.0190.02715.82
5.4.340.0180.02815.83
5.4.330.0040.00412.87
5.4.320.0040.02312.68
5.4.310.0080.02512.68
5.4.300.0070.02012.68
5.4.290.0050.02212.68
5.4.280.0070.02712.63
5.4.270.0030.02112.63
5.4.260.0060.02312.63
5.4.250.0080.02512.63
5.4.240.0090.02212.63
5.4.230.0040.02412.63
5.4.220.0060.02012.62
5.4.210.0050.02212.62
5.4.200.0040.02612.63
5.4.190.0050.02212.62
5.4.180.0060.02812.62
5.4.170.0020.02712.63
5.4.160.0070.02412.62
5.4.150.0080.02312.62
5.4.140.0040.02212.47
5.4.130.0040.02412.46
5.4.120.0080.02112.44
5.4.110.0050.02912.44
5.4.100.0050.02012.44
5.4.90.0030.02712.44
5.4.80.0060.03012.44
5.4.70.0060.02712.44
5.4.60.0050.02212.44
5.4.50.0070.02112.44
5.4.40.0060.02512.43
5.4.30.0060.02512.43
5.4.20.0060.02212.43
5.4.10.0060.02112.43
5.4.00.0050.02412.18
5.3.290.0080.03912.80
5.3.280.0060.04512.71
5.3.270.0050.04312.72
5.3.260.0100.04412.72
5.3.250.0060.05412.72
5.3.240.0100.04112.72
5.3.230.0080.04712.71
5.3.220.0090.04112.68
5.3.210.0090.04712.68
5.3.200.0100.03512.68
5.3.190.0080.04512.68
5.3.180.0060.04112.67
5.3.170.0090.05212.67
5.3.160.0050.04212.68
5.3.150.0100.03312.67
5.3.140.0070.03512.66
5.3.130.0040.03912.66
5.3.120.0080.03712.66
5.3.110.0050.04012.66
5.3.100.0080.03812.12
5.3.90.0060.05312.09
5.3.80.0090.04812.08
5.3.70.0090.03712.07
5.3.60.0070.03612.06
5.3.50.0060.03612.00
5.3.40.0040.03912.00
5.3.30.0060.03811.95
5.3.20.0100.03311.72
5.3.10.0050.03811.70
5.3.00.0070.03511.68
5.2.170.0020.0349.18
5.2.160.0070.0339.18
5.2.150.0040.0319.18
5.2.140.0090.0429.18
5.2.130.0060.0349.14
5.2.120.0070.0289.14
5.2.110.0070.0459.15
5.2.100.0070.0279.14
5.2.90.0060.0319.14
5.2.80.0040.0309.14
5.2.70.0110.0309.14
5.2.60.0050.0399.09
5.2.50.0080.0349.06
5.2.40.0040.0389.04
5.2.30.0060.0339.02
5.2.20.0080.0569.00
5.2.10.0010.0448.93
5.2.00.0070.0358.78
5.1.60.0050.0318.07
5.1.50.0030.0328.06
5.1.40.0070.0268.05
5.1.30.0060.0318.39
5.1.20.0040.0358.42
5.1.10.0070.0358.14
5.1.00.0080.0388.14
5.0.50.0050.0256.62
5.0.40.0050.0246.48
5.0.30.0070.0356.29
5.0.20.0030.0286.27
5.0.10.0050.0176.24
5.0.00.0030.0346.23
4.4.90.0050.0204.77
4.4.80.0040.0184.75
4.4.70.0050.0164.75
4.4.60.0050.0244.76
4.4.50.0020.0194.77
4.4.40.0040.0244.71
4.4.30.0010.0174.76
4.4.20.0030.0194.84
4.4.10.0050.0224.85
4.4.00.0020.0284.76
4.3.110.0010.0174.67
4.3.100.0040.0164.67
4.3.90.0040.0224.64
4.3.80.0020.0314.59
4.3.70.0040.0174.63
4.3.60.0040.0204.62
4.3.50.0050.0174.62
4.3.40.0020.0284.54
4.3.30.0020.0213.29
4.3.20.0030.0183.26
4.3.10.0020.0183.22
4.3.00.0030.01319.45

preferences:
41.73 ms | 400 KiB | 5 Q