3v4l.org

run code in 300+ PHP versions simultaneously
<?php $values = array( 'string_empty' => '', 'string_bool_f' => 'false', 'string_bool_t' => 'true', 'int_0' => 0, 'int_1' => 1, 'int_neg' => -100, 'int_norm' => 100, 'array_empty' => array(), 'array_null_val' => array(null), 'obj_empty' => new stdClass(), ); $mask = "%-15.15s %7.7s\n"; // Print header printf($mask, 'Name', 'Empty'); echo PHP_EOL; foreach ($values as $name => $val) { $empty = empty($val) ? 'true' : 'false'; printf($mask, $name, $empty); }

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.0140.00718.43
8.3.50.0100.01021.21
8.3.40.0070.00718.72
8.3.30.0180.00019.05
8.3.20.0070.00020.27
8.3.10.0000.00721.92
8.3.00.0090.00022.47
8.2.180.0110.00716.50
8.2.170.0040.01122.96
8.2.160.0110.00419.21
8.2.150.0030.00524.18
8.2.140.0030.00624.66
8.2.130.0110.00726.16
8.2.120.0040.01119.79
8.2.110.0060.00322.08
8.2.100.0080.00419.25
8.2.90.0000.00719.36
8.2.80.0000.00817.97
8.2.70.0000.00817.50
8.2.60.0090.00018.05
8.2.50.0000.00818.07
8.2.40.0040.00418.03
8.2.30.0070.00318.05
8.2.20.0050.00317.79
8.2.10.0080.00017.64
8.2.00.0060.00317.69
8.1.280.0070.01025.92
8.1.270.0080.00022.24
8.1.260.0000.00726.35
8.1.250.0090.00028.09
8.1.240.0060.00323.92
8.1.230.0110.00018.97
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0080.00017.25
8.1.190.0040.00417.39
8.1.180.0040.00418.80
8.1.170.0080.00418.53
8.1.160.0040.00422.07
8.1.150.0040.00818.70
8.1.140.0080.00017.46
8.1.130.0000.00717.89
8.1.120.0020.00517.46
8.1.110.0030.00617.39
8.1.100.0070.00017.36
8.1.90.0050.00317.45
8.1.80.0070.00017.40
8.1.70.0070.00017.49
8.1.60.0050.00317.63
8.1.50.0000.00917.61
8.1.40.0040.00417.45
8.1.30.0000.00717.62
8.1.20.0000.00817.70
8.1.10.0000.00817.52
8.1.00.0040.00417.50
8.0.300.0050.00318.77
8.0.290.0070.00017.16
8.0.280.0050.00218.45
8.0.270.0050.00217.23
8.0.260.0070.00016.90
8.0.250.0070.00016.88
8.0.240.0040.00816.98
8.0.230.0000.00716.91
8.0.220.0030.00316.93
8.0.210.0000.00616.89
8.0.200.0030.00316.99
8.0.190.0000.00716.95
8.0.180.0040.00416.83
8.0.170.0000.00716.95
8.0.160.0000.00716.95
8.0.150.0080.00016.87
8.0.140.0060.00316.89
8.0.130.0040.00413.38
8.0.120.0050.00316.80
8.0.110.0000.00716.97
8.0.100.0050.00216.86
8.0.90.0030.00516.91
8.0.80.0100.00516.85
8.0.70.0000.00716.77
8.0.60.0000.00716.79
8.0.50.0000.00816.92
8.0.30.0100.01217.32
8.0.20.0100.00917.40
8.0.10.0040.00416.98
8.0.00.0060.01216.88
7.4.330.0030.00315.06
7.4.320.0070.00016.59
7.4.300.0030.00316.47
7.4.290.0040.00416.49
7.4.280.0050.00316.64
7.4.270.0040.00416.67
7.4.260.0040.00416.61
7.4.250.0080.00016.54
7.4.240.0030.00416.63
7.4.230.0030.00316.61
7.4.220.0090.00916.44
7.4.210.0070.00716.56
7.4.200.0000.00716.42
7.4.190.0040.00416.67
7.4.160.0080.00816.44
7.4.150.0100.01317.40
7.4.140.0080.01117.86
7.4.130.0040.01316.54
7.4.120.0130.00416.46
7.4.110.0110.00616.66
7.4.100.0170.00016.51
7.4.90.0080.00816.26
7.4.80.0150.00619.39
7.4.70.0130.00416.43
7.4.60.0070.01016.57
7.4.50.0060.00016.37
7.4.40.0110.00522.77
7.4.30.0150.00716.35
7.4.00.0110.00714.83
7.3.330.0030.00313.04
7.3.320.0000.00513.27
7.3.310.0030.00316.38
7.3.300.0000.00716.27
7.3.290.0090.00616.20
7.3.280.0060.01016.28
7.3.270.0030.01317.40
7.3.260.0060.01116.22
7.3.250.0080.00816.22
7.3.240.0070.01416.43
7.3.230.0100.01316.39
7.3.210.0000.01716.34
7.3.200.0110.01116.63
7.3.190.0030.01916.53
7.3.180.0100.00716.65
7.3.170.0080.00816.35
7.3.160.0100.00716.34
7.3.120.0000.01415.04
7.3.10.0070.00816.38
7.3.00.0100.00716.40
7.2.330.0030.01416.48
7.2.320.0060.00916.77
7.2.310.0090.01216.39
7.2.300.0110.00616.50
7.2.290.0130.00316.50
7.2.130.0050.00816.84
7.2.120.0070.01216.53
7.2.110.0110.00516.93
7.2.100.0120.01216.70
7.2.90.0110.01216.65
7.2.80.0140.00716.81
7.2.70.0100.01216.53
7.2.60.0160.00717.02
7.2.50.0070.01016.69
7.2.40.0140.00916.76
7.2.30.0180.00916.94
7.2.20.0100.00616.67
7.2.10.0090.01416.80
7.2.00.0050.01216.75
7.1.250.0050.01215.65
7.1.200.0060.00615.40
7.1.70.0130.00017.19
7.1.60.0080.00319.82
7.1.50.0060.01316.57
7.1.00.0030.05322.45
7.0.200.0030.01316.77
7.0.140.0070.07022.00
7.0.60.0100.08320.01
7.0.50.0030.08317.86
7.0.40.0000.04719.96
7.0.30.0330.07720.18
7.0.20.0430.06320.20
7.0.10.0200.05720.30
7.0.00.0130.06320.09
5.6.280.0100.06721.04
5.6.210.0030.08320.51
5.6.200.0000.04318.17
5.6.190.0170.06720.27
5.6.180.3570.03720.49
5.6.170.0270.07320.48
5.6.160.0030.05320.38
5.6.150.0000.04318.11
5.6.140.0170.07318.09
5.6.130.0100.07318.13
5.6.120.0000.04721.09
5.6.110.0300.07321.04
5.6.100.0070.05720.97
5.6.90.0070.08321.11
5.6.80.0130.07020.40
5.6.70.0270.06720.50
5.5.350.0370.07020.42
5.5.340.0130.04017.90
5.5.330.0170.08020.40
5.5.320.0230.04020.29
5.5.310.0300.05720.21
5.5.300.0100.04717.89
5.5.290.0070.05317.88
5.5.280.0130.07720.77
5.5.270.0070.05320.97
5.5.260.0030.07020.73
5.5.250.0070.07320.71
5.5.240.0030.07320.26
5.4.450.0800.05319.25
5.4.440.0830.05319.58
5.4.430.1100.05719.52
5.4.420.1130.07019.48
5.4.410.1070.07319.33
5.4.400.1100.05318.59
5.4.390.0970.04718.77
5.4.380.0330.05318.54
5.4.370.0200.04318.61
5.4.360.0130.05318.55
5.4.350.0130.05718.71
5.4.340.0130.05318.49
5.4.320.0080.04312.45
5.4.310.0050.03812.45
5.4.300.0100.03412.46
5.4.290.0070.04112.45
5.4.280.0090.03112.35
5.4.270.0080.03812.35
5.4.260.0070.04212.35
5.4.250.0100.07018.88
5.4.240.0070.07318.94
5.4.230.0070.06018.93
5.4.220.0200.07018.91
5.4.210.0030.05718.69
5.4.200.0130.05018.73
5.4.190.0000.06019.01
5.4.180.0130.05318.77
5.4.170.0070.07318.73
5.4.160.0100.05718.89
5.4.150.0170.07318.88
5.4.140.0100.06716.50
5.4.130.0070.05316.27
5.4.120.0070.06716.45
5.4.110.0030.05316.48
5.4.100.0000.05716.49
5.4.90.0030.06316.48
5.4.80.0070.04716.32
5.4.70.0070.04716.48
5.4.60.0130.04316.42
5.4.50.0030.05716.41
5.4.40.0070.06716.36
5.4.30.0070.07016.40
5.4.20.0070.06716.36
5.4.10.0070.05316.48
5.4.00.0030.05315.73
5.3.290.0080.04712.80
5.3.280.0030.05714.60
5.3.270.0100.05314.62
5.3.260.0170.04314.63
5.3.250.0130.07314.49
5.3.240.0130.07014.61
5.3.230.0070.07014.68
5.3.220.0070.07314.58
5.3.210.0070.06314.58
5.3.200.0030.05014.34
5.3.190.0070.06314.58
5.3.180.0030.05714.71
5.3.170.0000.07014.57
5.3.160.0130.04714.58
5.3.150.0130.07314.59
5.3.140.0070.08014.57
5.3.130.0070.05714.38
5.3.120.0100.07314.57
5.3.110.0230.07314.24
5.3.100.0070.05714.05
5.3.90.0000.05713.87
5.3.80.0000.06713.80
5.3.70.0200.05313.93
5.3.60.0170.05314.08
5.3.50.0100.06314.04
5.3.40.0230.05313.96
5.3.30.0100.05313.82
5.3.20.0070.05313.74
5.3.10.0070.06713.73
5.3.00.0170.05313.79
5.2.170.0100.04011.04
5.2.160.0100.03710.98
5.2.150.0030.04711.14
5.2.140.0030.05711.04
5.2.130.0070.05711.18
5.2.120.0030.06011.13
5.2.110.0130.04311.11
5.2.100.0070.03711.02
5.2.90.0000.05710.98
5.2.80.0030.04311.11
5.2.70.0030.04011.11
5.2.60.0070.04011.06
5.2.50.0030.04310.78
5.2.40.0070.03711.15
5.2.30.0130.03311.09
5.2.20.0000.04711.07
5.2.10.0030.03711.07
5.2.00.0070.04010.93
5.1.60.0070.03010.05
5.1.50.0000.0439.77
5.1.40.0100.04310.01
5.1.30.0030.05710.41
5.1.20.0070.04310.42
5.1.10.0000.0379.96
5.1.00.0030.04010.09
5.0.50.0000.0339.67
5.0.40.0070.0239.67
5.0.30.0130.0439.67
5.0.20.0030.0339.67
5.0.10.0100.0279.67
5.0.00.0000.0439.67
4.4.90.0100.0179.67
4.4.80.0000.0309.67
4.4.70.0070.0279.67
4.4.60.0000.0239.67
4.4.50.0030.0209.67
4.4.40.0000.0379.67
4.4.30.0070.0179.67
4.4.20.0030.0309.67
4.4.10.0000.0239.67
4.4.00.0070.0309.67
4.3.110.0030.0209.67
4.3.100.0000.0339.67
4.3.90.0100.0239.67
4.3.80.0000.0339.67
4.3.70.0000.0339.67
4.3.60.0030.0309.67
4.3.50.0070.0239.67
4.3.40.0030.0439.67
4.3.30.0000.0239.67
4.3.20.0000.0339.67
4.3.10.0100.0209.67
4.3.00.0130.0207.19

preferences:
41.03 ms | 401 KiB | 5 Q