3v4l.org

run code in 300+ PHP versions simultaneously
<?php $name1 = 'no_gravity'; $name2 = 'n0_gr4v1ty'; function stringDiff($string1, $string2) { $x = str_split($string1); $y = str_split($string2); $diff = array_diff($x, $y); foreach ($diff as $letter) { $string1 = str_replace($letter, '-', $string1); } return $string1; } var_dump(stringDiff($name1, $name2));

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.0130.00316.63
8.3.60.0110.00416.63
8.3.50.0070.00716.34
8.3.40.0120.00318.77
8.3.30.0070.00718.59
8.3.20.0070.00020.21
8.3.10.0030.00622.09
8.3.00.0040.00423.64
8.2.180.0170.00016.50
8.2.170.0130.00318.83
8.2.160.0150.00620.19
8.2.150.0060.00325.66
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00421.04
8.2.110.0070.00321.09
8.2.100.0100.00017.63
8.2.90.0030.00618.16
8.2.80.0080.00018.16
8.2.70.0060.00319.22
8.2.60.0040.00417.63
8.2.50.0000.00817.55
8.2.40.0060.00319.35
8.2.30.0000.00819.25
8.2.20.0050.00218.23
8.2.10.0040.00418.16
8.2.00.0040.00418.15
8.1.280.0070.01125.92
8.1.270.0040.00424.66
8.1.260.0060.00326.35
8.1.250.0070.00028.09
8.1.240.0040.00422.48
8.1.230.0000.01120.89
8.1.220.0000.00717.77
8.1.210.0040.00418.77
8.1.200.0080.00017.35
8.1.190.0030.00617.22
8.1.180.0070.00318.10
8.1.170.0070.00018.86
8.1.160.0000.00718.95
8.1.150.0040.00420.06
8.1.140.0040.00717.39
8.1.130.0000.00818.90
8.1.120.0030.00317.38
8.1.110.0030.00517.53
8.1.100.0060.00317.36
8.1.90.0000.00817.41
8.1.80.0040.00417.48
8.1.70.0060.00317.45
8.1.60.0000.00817.48
8.1.50.0000.00817.57
8.1.40.0000.00817.58
8.1.30.0030.00617.73
8.1.20.0040.00417.62
8.1.10.0050.00217.45
8.1.00.0000.00817.32
8.0.300.0030.00319.89
8.0.290.0000.00816.75
8.0.280.0030.00318.46
8.0.270.0030.00317.31
8.0.260.0060.00018.36
8.0.250.0060.00017.03
8.0.240.0020.00516.96
8.0.230.0070.00016.89
8.0.220.0030.00316.82
8.0.210.0040.00416.85
8.0.200.0030.00316.82
8.0.190.0060.00316.83
8.0.180.0070.00016.95
8.0.170.0020.00516.91
8.0.160.0030.00516.96
8.0.150.0130.00016.80
8.0.140.0000.00816.87
8.0.130.0050.00013.33
8.0.120.0030.00516.87
8.0.110.0040.00416.94
8.0.100.0000.00716.94
8.0.90.0000.00716.84
8.0.80.0060.00916.88
8.0.70.0040.00416.84
8.0.60.0000.00716.96
8.0.50.0000.00816.95
8.0.30.0100.00717.05
8.0.20.0110.01317.40
8.0.10.0000.00716.96
8.0.00.0070.01116.51
7.4.330.0050.00015.55
7.4.320.0040.00416.52
7.4.300.0030.00316.42
7.4.290.0030.00616.62
7.4.280.0030.00616.48
7.4.270.0040.00416.66
7.4.260.0030.00316.45
7.4.250.0040.00416.61
7.4.240.0000.00716.50
7.4.230.0000.00716.51
7.4.220.0040.00416.32
7.4.210.0120.00916.57
7.4.200.0000.00716.45
7.4.160.0080.00816.47
7.4.150.0120.00717.40
7.4.140.0120.00717.86
7.4.130.0120.00616.46
7.4.120.0100.00816.53
7.4.110.0130.00716.45
7.4.100.0110.00616.39
7.4.90.0120.00416.43
7.4.80.0120.00619.39
7.4.70.0060.01516.59
7.4.60.0030.01416.52
7.4.50.0040.01416.55
7.4.40.0120.00316.43
7.4.30.0100.00616.43
7.4.00.0030.01014.86
7.3.330.0030.00313.30
7.3.320.0000.00613.12
7.3.310.0000.00716.29
7.3.300.0030.00316.19
7.3.290.0090.00916.29
7.3.280.0090.00816.29
7.3.270.0090.01417.40
7.3.260.0100.00816.39
7.3.250.0060.01116.37
7.3.240.0100.00816.40
7.3.230.0080.00916.64
7.3.210.0080.00816.32
7.3.200.0100.00716.29
7.3.190.0060.01016.30
7.3.180.0110.01016.53
7.3.170.0130.00716.54
7.3.160.0170.00016.46
7.2.330.0100.00716.60
7.2.320.0160.00816.77
7.2.310.0140.01016.71
7.2.300.0140.00316.78
7.2.290.0070.01016.79
7.2.60.0060.00616.85
7.1.200.0030.00615.83
7.1.100.6660.01315.91
7.1.90.7230.01316.05
7.1.80.6620.01016.11
7.1.70.6990.01215.32
7.1.60.5440.02033.17
7.1.50.6010.02032.86
7.1.40.5900.01332.59
7.1.30.6470.01032.53
7.1.20.5430.00932.67
7.1.10.6590.01214.90
7.1.00.6590.01514.71
7.0.240.6930.01015.92
7.0.230.4530.00715.71
7.0.220.6290.01315.79
7.0.210.5590.01014.94
7.0.200.7260.01015.05
7.0.190.7910.01014.87
7.0.180.6240.01314.34
7.0.170.7830.01014.61
7.0.160.7590.01314.48
7.0.150.5800.01214.56
7.0.140.4770.01114.59
7.0.130.6120.01314.73
7.0.120.5400.01214.85
7.0.110.6590.01014.66
7.0.100.5080.01914.65
7.0.90.6860.00714.41
7.0.80.7050.01614.43
7.0.70.4910.01014.39
7.0.60.5510.01314.42
7.0.50.6020.01014.71
7.0.40.5510.00714.62
7.0.30.4530.01014.85
7.0.20.9220.01314.48
7.0.10.8120.01914.66
7.0.00.7880.00714.68

preferences:
66.22 ms | 400 KiB | 5 Q