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"; } ?> - See more at: http://www.w3resource.com/php-exercises/php-string-exercises.php#sthash.Tz25SHhN.dpuf<?php

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.0120.00316.63
8.3.50.0090.01021.94
8.3.40.0090.00618.74
8.3.30.0070.00718.96
8.3.20.0070.00020.16
8.3.10.0060.00323.66
8.3.00.0000.00820.73
8.2.180.0070.00725.92
8.2.170.0070.00722.96
8.2.160.0070.00720.35
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0090.00026.16
8.2.120.0050.00220.52
8.2.110.0030.00622.16
8.2.100.0040.00717.72
8.2.90.0030.00619.17
8.2.80.0040.00417.97
8.2.70.0060.00317.50
8.2.60.0040.00417.88
8.2.50.0000.00918.07
8.2.40.0000.00919.94
8.2.30.0000.00718.24
8.2.20.0000.00817.55
8.2.10.0030.00618.05
8.2.00.0050.00217.73
8.1.280.0070.00725.92
8.1.270.0090.00023.96
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0050.00523.77
8.1.230.0000.01119.08
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0050.00317.10
8.1.190.0040.00417.10
8.1.180.0060.00318.10
8.1.170.0000.00818.55
8.1.160.0050.00221.98
8.1.150.0050.00318.52
8.1.140.0060.00317.33
8.1.130.0030.00317.80
8.1.120.0030.00317.43
8.1.110.0040.00417.34
8.1.100.0040.00417.43
8.1.90.0000.00817.34
8.1.80.0000.00717.41
8.1.70.0030.00317.33
8.1.60.0070.00017.57
8.1.50.0040.00417.34
8.1.40.0000.00717.47
8.1.30.0000.00817.53
8.1.20.0000.00717.47
8.1.10.0030.00517.57
8.1.00.0060.00317.40
8.0.300.0000.00718.77
8.0.290.0000.00717.04
8.0.280.0070.00018.43
8.0.270.0050.00317.16
8.0.260.0000.00717.29
8.0.250.0030.00316.78
8.0.240.0000.00816.79
8.0.230.0040.00416.80
8.0.220.0030.00616.79
8.0.210.0070.00016.80
8.0.200.0030.00316.79
8.0.190.0040.00316.80
8.0.180.0040.00416.75
8.0.170.0060.00316.86
8.0.160.0040.00416.79
8.0.150.0050.00216.82
8.0.140.0070.00016.86
8.0.130.0000.00613.21
8.0.120.0040.00416.84
8.0.110.0000.00716.74
8.0.100.0080.00016.67
8.0.90.0070.00016.85
8.0.80.0090.00616.86
8.0.70.0070.00016.89
8.0.60.0040.00416.65
8.0.50.0040.00416.84
8.0.30.0100.01317.12
8.0.20.0090.00917.40
8.0.10.0040.00416.97
8.0.00.0080.01316.88
7.4.330.0000.00615.13
7.4.320.0030.00316.46
7.4.300.0000.00716.58
7.4.290.0040.00416.48
7.4.280.0000.00716.49
7.4.270.0030.00316.61
7.4.260.0040.00416.39
7.4.250.0000.00716.48
7.4.240.0030.00416.61
7.4.230.0070.00016.30
7.4.220.0180.00616.57
7.4.210.0110.00416.63
7.4.200.0050.00216.47
7.4.190.0050.00216.66
7.4.160.0120.01216.46
7.4.150.0030.01417.40
7.4.140.0090.01017.86
7.4.130.0070.01016.53
7.4.120.0060.01116.53
7.4.110.0060.01016.25
7.4.100.0130.00316.34
7.4.90.0070.01016.55
7.4.80.0070.01419.39
7.4.70.0110.00516.43
7.4.60.0100.00716.44
7.4.50.0030.00316.49
7.4.40.0030.01416.38
7.4.30.0100.00716.52
7.3.330.0050.00012.93
7.3.320.0060.00013.01
7.3.310.0070.00016.10
7.3.300.0000.00716.28
7.3.290.0070.00716.20
7.3.280.0110.00916.22
7.3.270.0110.00717.40
7.3.260.0100.00716.23
7.3.250.0120.00516.38
7.3.240.0120.00616.26
7.3.230.0030.01316.39
7.3.210.0150.00416.42
7.3.200.0140.00719.39
7.3.190.0110.00716.63
7.3.180.0100.00716.37
7.3.170.0050.01116.36
7.3.160.0060.00916.40
7.2.330.0170.00716.70
7.2.320.0140.00316.70
7.2.310.0070.01416.69
7.2.300.0080.00816.36
7.2.290.0070.01016.46
5.5.130.0000.05720.11
5.5.120.0000.05320.10
5.5.110.0130.06720.14
5.5.100.0000.06720.09
5.5.90.0030.05019.94
5.5.80.0070.03720.14
5.5.70.0070.03720.14
5.5.60.0070.03720.03
5.5.50.0100.03320.09
5.5.40.0100.03320.15
5.5.30.0030.04320.10
5.5.20.0100.03320.11
5.5.10.0000.05020.02
5.5.00.0100.03320.04
5.4.290.0070.07018.79
5.4.280.0030.08018.81
5.4.270.0000.05019.12
5.4.260.0100.06319.04
5.4.250.0000.04719.13
5.4.240.0000.04719.04
5.4.230.0100.03019.23
5.4.220.0030.03719.00
5.4.210.0070.03318.96
5.4.200.0030.03718.98
5.4.190.0000.04318.80
5.4.180.0070.04018.78
5.4.170.0000.04018.97
5.4.160.0070.03719.10
5.4.150.0030.04018.96
5.4.140.0100.03316.36
5.4.130.0070.03316.31
5.4.120.0030.04016.38
5.4.110.0030.04016.21
5.4.100.0070.03316.27
5.4.90.0030.03716.41
5.4.80.0100.03316.43
5.4.70.0100.03316.25
5.4.60.0030.03016.43
5.4.50.0000.03716.41
5.4.40.0000.04316.48
5.4.30.0000.03716.21
5.4.20.0100.02316.29
5.4.10.0030.03716.28
5.4.00.0070.03315.78
5.3.290.0130.07014.66
5.3.280.0000.04014.58
5.3.270.0000.04014.60
5.3.260.0000.05714.59
5.3.250.0030.03014.54
5.3.240.0000.04014.59
5.3.230.0030.03714.61
5.3.220.0030.03714.54
5.3.210.0070.03014.54
5.3.200.0030.03714.42
5.3.190.0000.03314.51
5.3.180.0070.03314.43
5.3.170.0030.03014.42
5.3.160.0030.03714.42
5.3.150.0030.03714.41
5.3.140.0070.03314.55
5.3.130.0000.04014.40
5.3.120.0030.03014.54
5.3.110.0000.03314.51
5.3.100.0000.04014.00
5.3.90.0030.03713.98
5.3.80.0030.03013.88
5.3.70.0030.03013.97
5.3.60.0000.03313.98
5.3.50.0070.03313.80
5.3.40.0030.03013.80
5.3.30.0100.02313.84
5.3.20.0070.06013.64
5.3.10.0030.03313.41
5.3.00.0030.04013.57
5.2.170.0000.02711.19
5.2.160.0030.02711.19
5.2.150.0000.02711.09
5.2.140.0000.02711.13
5.2.130.0070.02711.14
5.2.120.0070.02310.96
5.2.110.0030.02311.10
5.2.100.0070.02011.08
5.2.90.0030.02310.96
5.2.80.0070.02011.08
5.2.70.0030.02311.11
5.2.60.0030.03010.89
5.2.50.0000.03011.02
5.2.40.0000.03010.98
5.2.30.0000.03010.82
5.2.20.0030.02710.80
5.2.10.0030.02010.96
5.2.00.0030.02710.76
5.1.60.0030.02710.05
5.1.50.0070.05310.05
5.1.40.0030.0439.80
5.1.30.0030.04310.24
5.1.20.0030.03710.46
5.1.10.0070.03310.07
5.1.00.0000.06010.15
5.0.50.0070.0278.61
5.0.40.0000.0208.39
5.0.30.0000.0538.22
5.0.20.0000.0208.28
5.0.10.0070.0438.11
5.0.00.0070.0478.25
4.4.90.0030.0137.48
4.4.80.0030.0137.48
4.4.70.0000.0207.48
4.4.60.0000.0137.48
4.4.50.0030.0137.48
4.4.40.0000.0237.48
4.4.30.0000.0237.48
4.4.20.0000.0177.48
4.4.10.0030.0307.48
4.4.00.0000.0507.48
4.3.110.0000.0307.48
4.3.100.0030.0337.48
4.3.90.0000.0337.48
4.3.80.0030.0307.48
4.3.70.0000.0337.48
4.3.60.0030.0207.48
4.3.50.0030.0307.48
4.3.40.0000.0407.48
4.3.30.0000.0177.48
4.3.20.0000.0177.48
4.3.10.0000.0377.48
4.3.00.0000.0237.48

preferences:
59.75 ms | 400 KiB | 5 Q