3v4l.org

run code in 300+ PHP versions simultaneously
<?php #### Option 1: Restricted type values // booleans $a = false; ++$a; // bool(true) ++$a; // bool(true) $a = true; --$a; // bool(false) --$a; // bool(false) // null values $a = null; --$a; // null $a = null; ++$a; // null // empty strings $a = ''; ++$a; // int(1) #### Option 2: Integer values // booleans $a = false; ++$a; // bool(true) ++$a; // int(2) $a = true; --$a; // bool(false) --$a; // int(-1) // null values $a = null; --$a; // int(-1) $a = null; ++$a; // int(1) #### non-numeric strings $a = '12d9'; ++$a; // string(4) "12e0" + Notice: String increment is deprecated, use str_inc() instead in php shell code on line 1 echo $a; ++$a; // float(13) echo $a;

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.0070.01416.58
8.3.60.0100.01016.50
8.3.50.0140.00722.11
8.3.40.0110.00418.79
8.3.30.0100.00318.94
8.3.20.0050.00520.04
8.3.10.0080.00023.65
8.3.00.0040.00419.56
8.2.180.0140.00716.50
8.2.170.0100.00322.96
8.2.160.0100.00720.48
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0100.00017.38
8.2.110.0030.00622.27
8.2.100.0110.00419.51
8.2.90.0040.00419.17
8.2.80.0040.00417.97
8.2.70.0060.00317.50
8.2.60.0080.00017.91
8.2.50.0000.01018.07
8.2.40.0060.00320.07
8.2.30.0000.00818.38
8.2.20.0000.00717.61
8.2.10.0000.00817.93
8.2.00.0040.00417.69
8.1.280.0090.00925.92
8.1.270.0050.00323.83
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00323.74
8.1.230.0110.00019.14
8.1.220.0000.00817.79
8.1.210.0080.00018.77
8.1.200.0060.00317.00
8.1.190.0040.00417.11
8.1.180.0030.00518.10
8.1.170.0000.00818.65
8.1.160.0000.00821.98
8.1.150.0040.00418.49
8.1.140.0070.00017.45
8.1.130.0030.00317.76
8.1.120.0030.00317.36
8.1.110.0060.00317.39
8.1.100.0000.00817.41
8.1.90.0040.00417.42
8.1.80.0050.00317.29
8.1.70.0000.00717.41
8.1.60.0000.00817.50
8.1.50.0000.00817.48
8.1.40.0000.00717.48
8.1.30.0080.00017.41
8.1.20.0040.00417.52
8.1.10.0000.00717.34
8.1.00.0050.00317.44
8.0.300.0070.00018.77
8.0.290.0000.00716.88
8.0.280.0070.00018.51
8.0.270.0050.00217.17
8.0.260.0030.00317.31
8.0.250.0030.00316.98
8.0.240.0060.00316.95
8.0.230.0040.00416.77
8.0.220.0000.00716.73
8.0.210.0000.00616.71
8.0.200.0070.00016.73
8.0.190.0070.00016.80
8.0.180.0040.00416.78
8.0.170.0050.00316.90
8.0.160.0000.00816.91
8.0.150.0050.00516.67
8.0.140.0000.00716.77
8.0.130.0030.00313.21
8.0.120.0000.00816.80
8.0.110.0070.00016.81
8.0.100.0040.00416.77
8.0.90.0030.00516.71
8.0.80.0090.00616.75
8.0.70.0070.00016.70
8.0.60.0070.00016.70
8.0.50.0050.00216.89
8.0.30.0170.00617.00
8.0.20.0140.00517.40
8.0.10.0050.00216.77
8.0.00.0100.00716.81
7.4.330.0060.00015.00
7.4.320.0030.00616.43
7.4.300.0060.00016.42
7.4.290.0030.00316.53
7.4.280.0000.00716.48
7.4.270.0030.00316.49
7.4.260.0000.00716.51
7.4.250.0040.00416.50
7.4.240.0050.00216.44
7.4.230.0000.00716.27
7.4.220.0100.00716.45
7.4.210.0060.00816.51
7.4.200.0070.00016.61
7.4.160.0080.00816.40
7.4.150.0130.00617.40
7.4.140.0100.01217.86
7.4.130.0080.01016.38
7.4.120.0100.00716.44
7.4.110.0120.01016.54
7.4.100.0060.01016.52
7.4.90.0170.00016.45
7.4.80.0150.00619.39
7.4.70.0080.00816.48
7.4.60.0070.01416.39
7.4.50.0000.00616.39
7.4.40.0060.01216.29
7.4.30.0060.01016.50
7.4.00.0050.01214.85
7.3.330.0000.00513.15
7.3.320.0030.00313.11
7.3.310.0030.00316.10
7.3.300.0040.00416.29
7.3.290.0140.00016.21
7.3.280.0060.01316.24
7.3.270.0040.01417.40
7.3.260.0150.00916.28
7.3.250.0100.01016.41
7.3.240.0050.01616.29
7.3.230.0130.01016.39
7.3.210.0070.01916.33
7.3.200.0060.01319.39
7.3.190.0030.01416.22
7.3.180.0000.01416.36
7.3.170.0080.00816.63
7.3.160.0030.01216.33
7.3.120.0080.00814.56
7.3.110.0030.01414.48
7.3.100.0070.00714.76
7.3.90.0090.00614.79
7.3.80.0030.01014.92
7.3.70.0070.01114.54
7.3.60.0070.00714.33
7.3.50.0100.00314.50
7.3.40.0070.01014.90
7.3.30.0120.00614.53
7.3.20.0070.01016.69
7.3.10.0070.00516.54
7.3.00.0030.00816.49
7.2.330.0160.00616.44
7.2.320.0030.01416.68
7.2.310.0110.00816.71
7.2.300.0110.00716.58
7.2.290.0110.00516.63
7.2.250.0090.00915.04
7.2.240.0030.01614.88
7.2.230.0100.00714.95
7.2.220.0090.00914.61
7.2.210.0060.00915.16
7.2.200.0090.00314.93
7.2.190.0100.00314.78
7.2.180.0000.01414.71
7.2.170.0000.00914.61
7.2.130.0080.00416.93
7.2.120.0100.00316.63
7.2.110.0030.01016.72
7.2.100.0000.01016.67
7.2.90.0030.00716.71
7.2.80.0070.00716.64
7.2.70.0030.01016.76
7.2.60.0030.00716.89
7.2.50.0070.00316.89
7.2.40.0030.00916.70
7.2.30.0030.00616.60
7.2.20.0030.01016.44
7.2.10.0070.00716.85
7.2.00.0000.01117.94
7.1.330.0030.01015.61
7.1.320.0110.00715.62
7.1.310.0030.01315.44
7.1.300.0030.00715.61
7.1.290.0040.01115.45
7.1.280.0040.00415.70
7.1.270.0070.00715.70
7.1.260.0030.01215.56
7.1.250.0070.00415.77
7.1.100.0080.00418.09
7.1.70.0090.00616.88
7.1.60.0060.01819.70
7.1.50.0100.01016.84
7.1.00.0030.07022.35
7.0.200.0190.01414.62
7.0.140.0030.07322.10
7.0.60.0100.08720.02
7.0.50.0030.04017.80
7.0.40.0070.04320.09
7.0.30.0300.08020.17
7.0.20.0230.04319.99
7.0.10.0000.09320.45
7.0.00.0070.09020.13
5.6.280.0070.07021.06
5.6.210.0100.05720.75
5.6.200.0070.03718.11
5.6.190.0130.08320.27
5.6.180.5100.05320.45
5.6.170.0270.06320.50
5.6.160.0100.08320.71
5.6.150.0100.07318.22
5.6.140.0030.04718.18
5.6.130.0070.03718.15
5.6.120.0070.08320.96
5.6.110.0130.07720.96
5.6.100.0170.07320.97
5.6.90.0100.08020.96
5.6.80.0100.08020.37
5.6.70.4300.04020.51
5.5.350.0130.07720.43
5.5.340.0030.04317.89
5.5.330.0100.07720.21
5.5.320.0270.07320.34
5.5.310.0130.04320.30
5.5.300.0030.05318.01
5.5.290.0070.07717.98
5.5.280.0070.08320.74
5.5.270.0070.08020.86
5.5.260.0000.07720.86
5.5.250.0100.07320.54
5.5.240.0300.07320.34
5.4.450.0630.04743.87
5.4.440.0230.04343.79
5.4.430.0300.04743.77
5.4.420.0300.04043.77
5.4.410.0270.04743.77
5.4.400.0200.03743.77
5.4.390.0330.04743.75
5.4.380.0200.05318.46
5.4.370.0370.05018.66
5.4.360.0170.05018.66
5.4.350.0270.04718.48
5.4.340.0130.06318.46
5.4.320.0040.03912.45
5.4.310.0080.03612.45
5.4.300.0070.03912.45
5.4.290.0040.03912.45
5.4.280.0050.03612.34
5.4.270.0050.03712.34
5.4.260.0070.03612.35
5.4.250.0050.03812.35
5.4.240.0060.03612.35
5.4.230.0050.03912.34
5.4.220.0070.03412.34
5.4.210.0110.02912.34
5.4.200.0100.03912.34
5.4.190.0040.03712.33
5.4.180.0110.03812.33
5.4.170.0060.03512.34
5.4.160.0040.04012.34
5.4.150.0070.03812.34
5.4.140.0050.03812.02
5.4.130.0090.03212.01
5.4.120.0040.04311.96
5.4.110.0030.04511.96
5.4.100.0050.03611.96
5.4.90.0070.03611.96
5.4.80.0050.03811.96
5.4.70.0060.03511.96
5.4.60.0070.03511.96
5.4.50.0070.03711.96
5.4.40.0050.03611.95
5.4.30.0050.03611.95
5.4.20.0070.03811.95
5.4.10.0060.03411.95
5.4.00.0100.03311.44
5.3.290.0090.05412.80
5.3.280.0070.04712.70
5.3.270.0070.04512.72
5.3.260.0100.03512.72
5.3.250.0040.04712.71
5.3.240.0090.04312.72
5.3.230.0070.03612.70
5.3.220.0050.03812.68
5.3.210.0060.04012.68
5.3.200.0110.03912.68
5.3.190.0060.03712.67
5.3.180.0090.03412.68
5.3.170.0060.03712.67
5.3.160.0090.03412.68
5.3.150.0050.04012.67
5.3.140.0040.03812.66
5.3.130.0050.04012.66
5.3.120.0060.03912.66
5.3.110.0040.04212.66
5.3.100.0090.04312.12
5.3.90.0110.03312.09
5.3.80.0030.03812.07
5.3.70.0070.03412.07
5.3.60.0050.03612.06
5.3.50.0070.03512.00
5.3.40.0050.04212.00
5.3.30.0050.03511.95
5.3.20.0070.03611.74
5.3.10.0100.03011.69
5.3.00.0060.03411.69
5.2.170.0060.0319.18
5.2.160.0050.0289.18
5.2.150.0010.0339.18
5.2.140.0050.0359.18
5.2.130.0080.0259.14
5.2.120.0040.0309.14
5.2.110.0060.0279.14
5.2.100.0040.0369.14
5.2.90.0060.0279.14
5.2.80.0040.0309.14
5.2.70.0080.0319.14
5.2.60.0020.0329.09
5.2.50.0070.0289.06
5.2.40.0030.0339.03
5.2.30.0090.0309.01
5.2.20.0090.0269.00
5.2.10.0060.0298.95
5.2.00.0050.0288.81
5.1.60.0070.0208.09
5.1.50.0050.0288.09
5.1.40.0040.0238.07
5.1.30.0050.0248.43
5.1.20.0060.0258.45
5.1.10.0020.0278.17
5.1.00.0040.0258.17
5.0.50.0060.0216.65
5.0.40.0030.0266.51
5.0.30.0030.0316.32
5.0.20.0050.0246.30
5.0.10.0020.0266.29
5.0.00.0050.0286.28
4.4.90.0050.0134.78
4.4.80.0020.0164.75
4.4.70.0050.0194.75
4.4.60.0040.0164.76
4.4.50.0040.0154.77
4.4.40.0050.0234.70
4.4.30.0020.0164.76
4.4.20.0060.0124.85
4.4.10.0020.0164.85
4.4.00.0040.0234.75
4.3.110.0050.0134.67
4.3.100.0020.0154.66
4.3.90.0010.0164.63
4.3.80.0020.0254.59
4.3.70.0000.0174.63
4.3.60.0040.0134.63
4.3.50.0020.0164.63
4.3.40.0010.0254.54
4.3.30.0040.0183.33
4.3.20.0010.0173.31
4.3.10.0010.0163.27
4.3.00.0170.01743.73

preferences:
41.97 ms | 401 KiB | 5 Q