3v4l.org

run code in 300+ PHP versions simultaneously
<?php $animal = 'dog'; $age = 4; $sentance1 = 'The %s is %d years old'; $result1 = sprintf($sentance1, $animal, $age); $sentance2 = 'Age: %d. Animal: %s'; $result2 = sprintf($sentance2, $age, $animal); $sentance3 = 'Age: %2$d. Animal: %1$s'; $result3 = sprintf($sentance3, $animal, $age); print($result1 . PHP_EOL); print($result2 . PHP_EOL); print($result3 . PHP_EOL);

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.0110.00418.43
8.3.50.0090.00816.32
8.3.40.0100.01018.55
8.3.30.0100.00318.67
8.3.20.0000.00820.83
8.3.10.0000.00720.38
8.3.00.0080.00021.90
8.2.180.0100.00325.92
8.2.170.0150.00018.79
8.2.160.0100.00322.96
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0100.00326.16
8.2.110.0030.00620.43
8.2.100.0040.00717.91
8.2.90.0080.00018.03
8.2.80.0080.00017.97
8.2.70.0050.00317.91
8.2.60.0000.00717.97
8.2.50.0030.00518.10
8.2.40.0080.00019.42
8.2.30.0000.00719.23
8.2.20.0000.00818.10
8.2.10.0040.00418.85
8.2.00.0040.00419.35
8.1.280.0110.00325.92
8.1.270.0050.00322.24
8.1.260.0100.00726.35
8.1.250.0000.00828.09
8.1.240.0080.00022.46
8.1.230.0070.00420.85
8.1.220.0080.00017.74
8.1.210.0060.00318.77
8.1.200.0060.00317.22
8.1.190.0060.00317.13
8.1.180.0050.00518.10
8.1.170.0000.00818.45
8.1.160.0000.00718.80
8.1.150.0070.00018.81
8.1.140.0050.00318.92
8.1.130.0000.00720.10
8.1.120.0030.00317.29
8.1.110.0080.00017.43
8.1.100.0070.00017.45
8.1.90.0050.00317.42
8.1.80.0000.00717.35
8.1.70.0030.00317.36
8.1.60.0000.00917.47
8.1.50.0000.00817.48
8.1.40.0030.00617.45
8.1.30.0000.00817.56
8.1.20.0040.00417.41
8.1.10.0070.00017.49
8.1.00.0050.00417.44
8.0.300.0080.00020.03
8.0.290.0030.00716.63
8.0.280.0030.00318.44
8.0.270.0000.00717.27
8.0.260.0060.00018.35
8.0.250.0030.00316.88
8.0.240.0070.00016.99
8.0.230.0080.00016.98
8.0.220.0070.00316.89
8.0.210.0030.00316.94
8.0.200.0030.00316.93
8.0.190.0000.00716.90
8.0.180.0000.00716.90
8.0.170.0060.00316.89
8.0.160.0040.00816.79
8.0.150.0070.00016.78
8.0.140.0070.00016.76
8.0.130.0000.00713.30
8.0.120.0030.00616.77
8.0.110.0030.00316.98
8.0.100.0000.00716.74
8.0.90.0000.00716.78
8.0.80.0030.01516.88
8.0.70.0050.00216.76
8.0.60.0080.00016.77
8.0.50.0040.00416.73
8.0.30.0080.00817.11
8.0.20.0100.00817.14
8.0.10.0000.00716.88
8.0.00.0120.00616.70
7.4.330.0050.00015.55
7.4.320.0060.00016.54
7.4.300.0030.00316.48
7.4.290.0000.00816.47
7.4.280.0000.00816.27
7.4.270.0070.00016.54
7.4.260.0000.00716.43
7.4.250.0030.00316.48
7.4.240.0000.00716.41
7.4.230.0000.00716.45
7.4.220.0050.00316.63
7.4.210.0080.00716.46
7.4.200.0030.00316.64
7.4.160.0110.00716.44
7.4.140.0070.01417.86
7.4.130.0130.00616.48
7.4.120.0130.00316.43
7.4.110.0030.01516.25
7.4.100.0090.00616.49
7.4.90.0090.00816.58
7.4.80.0040.01419.39
7.4.70.0120.00416.46
7.4.60.0080.00816.44
7.4.50.0060.00916.39
7.4.40.0150.00616.50
7.4.00.0000.01315.04
7.3.330.0000.00512.92
7.3.320.0000.00612.98
7.3.310.0000.00816.21
7.3.300.0000.00716.21
7.3.290.0040.01116.29
7.3.280.0110.00816.23
7.3.260.0100.01016.35
7.3.240.0100.00916.31
7.3.230.0070.01016.30
7.3.210.0090.00916.64
7.3.200.0030.01316.32
7.3.190.0110.00416.49
7.3.180.0060.00916.33
7.3.170.0130.00316.10
7.3.160.0100.00916.30
7.3.50.0040.00714.66
7.3.40.0150.00614.65
7.3.30.0040.00714.30
7.3.20.0160.00014.54
7.3.10.0090.01214.68
7.3.00.0180.00014.80
7.2.330.0140.00416.71
7.2.320.0100.01016.71
7.2.310.0080.00916.73
7.2.300.0040.01516.40
7.2.290.0070.01316.25
7.2.180.0080.01314.88
7.2.170.0060.00614.87
7.2.160.0090.01614.81
7.2.150.0160.00814.96
7.2.140.0070.01015.14
7.2.130.0110.00715.13
7.2.120.0070.01014.77
7.2.110.0070.01015.09
7.2.100.0120.00914.73
7.2.90.0120.00314.82
7.2.80.0060.00914.89
7.2.70.0140.00715.11
7.2.60.0160.00915.05
7.2.50.0100.01614.77
7.2.40.0110.01414.81
7.2.30.0070.01315.04
7.2.20.0130.01315.08
7.2.10.0030.01114.74
7.2.00.0360.00314.98
7.1.280.0070.01413.68
7.1.270.0100.00613.59
7.1.260.0060.01013.82
7.1.250.0140.01013.69

preferences:
30.95 ms | 401 KiB | 5 Q