3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = 20; // $x is an integer $str1 = (string)$x; // $str1 is a string now // Check whether $x and $str1 are equal or not if ($x === $str1) { echo "They are the same"; } else { echo "They are not same"; } ?>

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.0100.00716.50
8.3.50.0250.00522.12
8.3.40.0110.00718.80
8.3.30.0100.00319.07
8.3.20.0000.00720.24
8.3.10.0070.00423.56
8.3.00.0040.00419.26
8.2.180.0070.00716.38
8.2.170.0070.00722.96
8.2.160.0130.00620.43
8.2.150.0000.00724.18
8.2.140.0060.00324.66
8.2.130.0100.00726.16
8.2.120.0040.00422.30
8.2.110.0060.00322.05
8.2.100.0070.00417.72
8.2.90.0000.00919.05
8.2.80.0000.00817.97
8.2.70.0050.00317.63
8.2.60.0000.00818.04
8.2.50.0060.00318.07
8.2.40.0040.00420.01
8.2.30.0000.00718.06
8.2.20.0000.00817.73
8.2.10.0040.00417.96
8.2.00.0060.00317.61
8.1.280.0040.01125.92
8.1.270.0050.00323.98
8.1.260.0060.00326.35
8.1.250.0030.00528.09
8.1.240.0030.00623.92
8.1.230.0100.00019.10
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0030.00617.25
8.1.190.0050.00217.40
8.1.180.0050.00518.10
8.1.170.0040.00418.53
8.1.160.0050.00221.82
8.1.150.0040.00418.49
8.1.140.0000.00717.39
8.1.130.0070.00017.76
8.1.120.0000.00717.38
8.1.110.0080.00017.41
8.1.100.0030.00617.38
8.1.90.0050.00217.38
8.1.80.0070.00017.45
8.1.70.0030.00317.43
8.1.60.0090.00017.56
8.1.50.0030.00617.43
8.1.40.0000.00817.53
8.1.30.0040.00417.52
8.1.20.0040.00417.69
8.1.10.0050.00317.50
8.1.00.0040.00417.33
8.0.300.0040.00420.71
8.0.290.0040.00417.05
8.0.280.0000.00818.44
8.0.270.0030.00317.25
8.0.260.0000.00817.26
8.0.250.0080.00016.81
8.0.240.0040.00416.78
8.0.230.0000.00716.90
8.0.220.0070.00016.71
8.0.210.0000.00716.81
8.0.200.0000.00616.82
8.0.190.0030.00616.93
8.0.180.0040.00716.75
8.0.170.0060.00316.84
8.0.160.0000.00716.67
8.0.150.0000.00716.76
8.0.140.0040.00416.79
8.0.130.0060.00013.24
8.0.120.0030.00516.77
8.0.110.0000.00816.82
8.0.100.0000.00716.88
8.0.90.0030.00416.88
8.0.80.0040.01116.87
8.0.70.0000.00716.63
8.0.60.0000.00716.73
8.0.50.0040.00316.86
8.0.30.0140.00916.97
8.0.20.0070.01117.40
8.0.10.0070.00016.91
8.0.00.0110.00916.81
7.4.330.0050.00015.00
7.4.320.0030.00616.52
7.4.300.0000.00616.45
7.4.290.0040.00416.59
7.4.280.0000.00816.50
7.4.270.0040.00416.45
7.4.260.0090.00016.55
7.4.250.0000.00816.55
7.4.240.0020.00616.55
7.4.230.0000.00716.25
7.4.220.0130.00916.44
7.4.210.0080.00716.58
7.4.200.0050.00316.54
7.4.190.0000.00716.58
7.4.160.0030.01316.56
7.4.150.0060.01217.40
7.4.140.0120.00817.86
7.4.130.0100.00716.45
7.4.120.0100.00616.52
7.4.110.0080.00916.30
7.4.100.0090.00916.53
7.4.90.0140.00316.38
7.4.80.0030.01619.39
7.4.70.0060.01116.47
7.4.60.0060.00916.52
7.4.50.0060.00316.56
7.4.40.0070.01122.77
7.4.30.0110.00616.61
7.4.00.0100.00715.13
7.3.330.0030.00313.20
7.3.320.0030.00313.00
7.3.310.0070.00016.31
7.3.300.0000.00816.18
7.3.290.0120.00616.22
7.3.280.0090.00616.29
7.3.270.0090.00917.40
7.3.260.0140.00416.59
7.3.250.0080.01016.32
7.3.240.0180.00316.36
7.3.230.0090.01216.49
7.3.210.0070.01016.31
7.3.200.0090.01419.39
7.3.190.0040.01216.27
7.3.180.0110.00416.54
7.3.170.0130.00316.52
7.3.160.0130.00316.26
7.3.120.0100.00714.78
7.3.10.0040.00716.50
7.3.00.0070.00716.52
7.2.330.0110.00816.22
7.2.320.0170.00016.36
7.2.310.0000.01616.36
7.2.300.0070.01116.64
7.2.290.0100.00716.64
7.2.130.0030.01016.79
7.2.120.0040.00716.84
7.2.110.0070.00716.89
7.2.100.0050.00516.86
7.2.90.0070.00716.88
7.2.80.0130.00016.94
7.2.70.0070.00716.89
7.2.60.0030.00616.90
7.2.50.0160.00416.76
7.2.40.0050.00516.67
7.2.30.0050.01316.81
7.2.20.0110.00716.72
7.2.10.0180.00716.98
7.2.00.0030.01318.07
7.1.250.0000.01015.48
7.1.200.0070.00315.75
7.1.100.0030.01218.10
7.1.70.0050.00216.81
7.1.60.0090.01219.46
7.1.50.0190.01334.82
7.1.00.0070.07322.29
7.0.200.0230.00014.66
7.0.140.0000.07322.05
7.0.60.0170.07319.81
7.0.50.0170.07017.80
7.0.40.0030.07720.12
7.0.30.0370.08320.13
7.0.20.0200.05320.30
7.0.10.0170.07320.00
7.0.00.0130.04720.08
5.6.280.0030.07321.10
5.6.210.0100.07020.72
5.6.200.0130.04018.19
5.6.190.0070.08320.35
5.6.180.0270.08720.35
5.6.170.0200.07020.49
5.6.160.0030.04320.41
5.6.150.0070.06718.13
5.6.140.0070.05318.16
5.6.130.0030.06718.18
5.6.120.0030.09021.00
5.6.110.0130.08020.97
5.6.100.0070.04020.98
5.6.90.0130.07720.99
5.6.80.0000.04320.32
5.6.70.0430.06720.34
5.5.350.0030.03320.48
5.5.340.0030.08317.96
5.5.330.0070.04020.34
5.5.320.0230.05020.24
5.5.310.0270.07720.31
5.5.300.0000.04017.92
5.5.290.0030.08717.97
5.5.280.0100.08320.79
5.5.270.0070.08720.75
5.5.260.0070.08720.75
5.5.250.0130.08020.78
5.5.240.0200.05020.18
5.4.450.0770.06019.61
5.4.440.0770.07019.46
5.4.430.1000.05019.46
5.4.420.0800.07719.56
5.4.410.0700.06319.46
5.4.400.0730.04718.77
5.4.390.0130.05319.28
5.4.380.0370.05018.73
5.4.370.0400.06018.57
5.4.360.0430.07718.72
5.4.350.0570.05318.48
5.4.340.0430.04318.55
5.4.320.0080.03612.45
5.4.310.0110.03412.45
5.4.300.0070.04012.45
5.4.290.0090.06112.43
5.4.280.0060.05112.33
5.4.270.0110.06012.33
5.4.260.0060.05612.33
5.4.250.0070.04012.33
5.4.240.0080.04212.33
5.4.230.0070.05012.32
5.4.220.0080.04612.32
5.4.210.0060.04412.32
5.4.200.0140.04412.32
5.4.190.0120.05612.32
5.4.180.0060.04112.32
5.4.170.0110.04612.33
5.4.160.0100.03712.32
5.4.150.0070.04212.32
5.4.140.0090.04512.01
5.4.130.0090.03712.00
5.4.120.0100.04011.96
5.4.110.0160.07211.95
5.4.100.0140.04611.95
5.4.90.0090.03811.95
5.4.80.0070.04811.95
5.4.70.0070.04311.95
5.4.60.0070.04711.94
5.4.50.0080.03411.94
5.4.40.0100.03811.93
5.4.30.0090.04411.93
5.4.20.0060.04111.93
5.4.10.0110.07311.93
5.4.00.0110.07111.41
5.3.290.0080.06012.80
5.3.280.0110.05112.71
5.3.270.0110.04412.72
5.3.260.0140.09912.72
5.3.250.0120.07612.72
5.3.240.0210.07212.72
5.3.230.0150.10412.70
5.3.220.0110.07912.68
5.3.210.0180.08112.68
5.3.200.0090.05812.68
5.3.190.0160.06612.68
5.3.180.0050.04712.67
5.3.170.0050.05212.67
5.3.160.0130.05812.68
5.3.150.0110.05012.67
5.3.140.0140.05212.66
5.3.130.0100.04912.66
5.3.120.0110.06312.66
5.3.110.0130.07212.66
5.3.100.0110.09112.12
5.3.90.0160.05812.08
5.3.80.0180.09212.08
5.3.70.0160.06112.07
5.3.60.0200.07012.06
5.3.50.0100.04912.00
5.3.40.0100.07312.00
5.3.30.0110.06511.96
5.3.20.0140.06311.72
5.3.10.0150.06311.69
5.3.00.0190.07011.68
5.2.170.0140.0639.18
5.2.160.0080.0399.18
5.2.150.0090.0329.18
5.2.140.0040.0419.17
5.2.130.0070.0339.13
5.2.120.0050.0359.13
5.2.110.0030.0379.14
5.2.100.0100.0339.13
5.2.90.0100.0319.13
5.2.80.0100.0319.13
5.2.70.0120.0299.13
5.2.60.0050.0409.08
5.2.50.0080.0329.05
5.2.40.0120.0339.03
5.2.30.0080.0409.00
5.2.20.0050.0458.99
5.2.10.0120.0368.93
5.2.00.0120.0358.79
5.1.60.0120.0468.07
5.1.50.0060.0338.07
5.1.40.0060.0438.05
5.1.30.0070.0388.41
5.1.20.0050.0418.43
5.1.10.0060.0348.15
5.1.00.0040.0278.15
5.0.50.0050.0216.63
5.0.40.0030.0216.48
5.0.30.0030.0346.30
5.0.20.0030.0236.27
5.0.10.0050.0206.24
5.0.00.0040.0316.24
4.4.90.0010.0184.78
4.4.80.0040.0154.76
4.4.70.0000.0194.75
4.4.60.0020.0174.76
4.4.50.0010.0184.77
4.4.40.0020.0284.71
4.4.30.0040.0154.76
4.4.20.0030.0184.85
4.4.10.0090.0174.85
4.4.00.0040.0254.76
4.3.110.0020.0174.67
4.3.100.0030.0164.66
4.3.90.0060.0164.63
4.3.80.0020.0274.58
4.3.70.0030.0154.63
4.3.60.0040.0144.63
4.3.50.0010.0184.63
4.3.40.0020.0254.54
4.3.30.0020.0233.29
4.3.20.0000.0193.27
4.3.10.0020.0173.23
4.3.00.0200.02710.54

preferences:
39.87 ms | 401 KiB | 5 Q