3v4l.org

run code in 300+ PHP versions simultaneously
<?php $search = htmlentities("apple;phpinfo()/e\0"); echo "/" . $search . "/"; echo "\n"; if (strpos($search, 'apple') !== false) { echo preg_replace("/" . $search . "/", $search . " <img src='" . $search . ".png'>", "apple"); } elseif (strpos($search, 'orange') !== false) { echo preg_replace("/" . $search . "/", $search . " <img src='" . $search . ".png'>", "orange"); } elseif (strpos($search, 'banana') !== false) { echo preg_replace("/" . $search . "/", $search . " <img src='" . $search . ".png'>", "banana"); } elseif (strpos($search, 'kiwi') !== false) { echo preg_replace("/" . $search . "/", $search . " <img src='" . $search . ".png'>", "kiwi"); } else echo "Please search for apple, orange, banana, or kiwi.";

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.4.20.0170.00317.57
8.4.10.0030.00617.75
8.3.150.0140.00317.07
8.3.140.0040.00418.70
8.3.130.0070.00316.57
8.3.120.0060.00318.83
8.3.110.0040.00416.63
8.3.100.0060.00324.06
8.3.90.0040.00426.77
8.3.80.0060.00318.56
8.3.70.0150.00718.55
8.3.60.0120.00318.43
8.3.50.0200.00921.14
8.3.40.0040.01118.54
8.3.30.0000.01419.09
8.3.20.0040.00420.35
8.3.10.0040.00422.09
8.3.00.0020.00522.39
8.2.270.0040.01218.59
8.2.260.0040.00417.17
8.2.250.0000.00818.25
8.2.240.0030.00618.71
8.2.230.0030.00620.94
8.2.220.0000.00937.54
8.2.210.0040.00426.77
8.2.200.0040.00416.63
8.2.190.0090.00916.63
8.2.180.0120.00318.41
8.2.170.0120.00322.96
8.2.160.0170.00320.45
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0070.00019.56
8.2.110.0060.00321.07
8.2.100.0080.00319.27
8.2.90.0040.00419.21
8.2.80.0030.00517.97
8.2.70.0100.00017.63
8.2.60.0000.00818.03
8.2.50.0030.00518.07
8.2.40.0040.00418.28
8.2.30.0080.00017.99
8.2.20.0000.00817.73
8.2.10.0000.00817.57
8.2.00.0000.00817.76
8.1.310.0040.00416.76
8.1.300.0080.00018.29
8.1.290.0080.00318.88
8.1.280.0040.01125.92
8.1.270.0060.01020.30
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00321.23
8.1.230.0030.00719.15
8.1.220.0080.00017.74
8.1.210.0060.00318.77
8.1.200.0090.00017.36
8.1.190.0000.00817.51
8.1.180.0050.00318.44
8.1.170.0040.00418.48
8.1.160.0000.00722.14
8.1.150.0000.01118.71
8.1.140.0040.00417.52
8.1.130.0070.00017.75
8.1.120.0000.00817.49
8.1.110.0040.00417.33
8.1.100.0000.01017.31
8.1.90.0050.00217.52
8.1.80.0000.00717.41
8.1.70.0080.00017.50
8.1.60.0080.00017.59
8.1.50.0050.00317.50
8.1.40.0080.00017.52
8.1.30.0040.00417.58
8.1.20.0040.00417.65
8.1.10.0040.00417.56
8.1.00.0000.00717.46
8.0.300.0040.00418.77
8.0.290.0070.00017.05
8.0.280.0030.00318.51
8.0.270.0030.00317.28
8.0.260.0070.00016.78
8.0.250.0000.00616.98
8.0.240.0040.00417.02
8.0.230.0030.00717.00
8.0.220.0000.00816.95
8.0.210.0000.00716.88
8.0.200.0000.00617.05
8.0.190.0000.00817.01
8.0.180.0030.00316.94
8.0.170.0080.00016.95
8.0.160.0030.00616.95
8.0.150.0040.00416.91
8.0.140.0050.00316.95
8.0.130.0030.00313.49
8.0.120.0040.00416.97
8.0.110.0000.00717.02
8.0.100.0040.00416.98
8.0.90.0000.00816.98
8.0.80.0100.00716.93
8.0.70.0070.00016.86
8.0.60.0000.00716.82
8.0.50.0050.00217.02
8.0.30.0100.01117.12
8.0.20.0070.01217.40
8.0.10.0020.00517.16
8.0.00.0100.01516.89
7.4.330.0000.00615.00
7.4.320.0030.00316.48
7.4.300.0060.00016.66
7.4.290.0000.00616.51
7.4.280.0030.00316.50
7.4.270.0040.00416.52
7.4.260.0030.00316.40
7.4.250.0040.00416.57
7.4.240.0000.00716.54
7.4.230.0000.00616.64
7.4.220.0030.00516.37
7.4.210.0080.00816.50
7.4.200.0070.00016.61
7.4.190.0020.00516.48
7.4.160.0090.00616.33
7.4.150.0090.00917.40
7.4.140.0110.00817.86
7.4.130.0080.00916.59
7.4.120.0030.01316.53
7.4.110.0090.00916.41
7.4.100.0090.01116.47
7.4.90.0060.01016.68
7.4.80.0120.00619.39
7.4.70.0080.00816.34
7.4.60.0130.00316.42
7.4.50.0040.00016.43
7.4.40.0050.00522.77
7.4.30.0040.01416.60
7.4.10.0060.01215.00
7.4.00.0080.00915.10
7.3.330.0020.00213.25
7.3.320.0000.00513.08
7.3.310.0030.00316.43
7.3.300.0000.00716.36
7.3.290.0030.01416.32
7.3.280.0070.01016.38
7.3.270.0030.01417.40
7.3.260.0130.01016.38
7.3.250.0080.00816.44
7.3.240.0060.01216.52
7.3.230.0140.00316.46
7.3.210.0070.01016.52
7.3.200.0070.01119.39
7.3.190.0180.00316.57
7.3.180.0060.00916.52
7.3.170.0100.00616.56
7.3.160.0160.00016.39
7.3.130.0030.01614.75
7.3.120.0050.01014.91
7.3.110.0060.00914.94
7.3.100.0100.00614.87
7.3.90.0080.00714.74
7.3.80.0040.00914.77
7.3.70.0100.00314.73
7.3.60.0080.00514.79
7.3.50.0080.00514.72
7.3.40.0060.00814.70
7.3.30.0040.00714.64
7.3.20.0070.00716.75
7.3.10.0050.00716.41
7.3.00.0040.00716.74
7.2.330.0090.00916.80
7.2.320.0120.01516.48
7.2.310.0120.00616.64
7.2.300.0030.01516.46
7.2.290.0080.00816.78
7.2.260.0070.01114.88
7.2.250.0070.00915.25
7.2.240.0030.01414.98
7.2.230.0050.00715.02
7.2.220.0020.01115.05
7.2.210.0050.00714.82
7.2.200.0090.00515.19
7.2.190.0030.00715.00
7.2.180.0080.00614.72
7.2.170.0110.00514.94
7.2.160.0040.00815.22
7.2.150.0070.00716.98
7.2.140.0040.00416.72
7.2.130.0030.00716.61
7.2.120.0030.01016.92
7.2.110.0030.01017.09
7.2.100.0100.00016.60
7.2.90.0040.00816.64
7.2.80.0000.01016.72
7.2.70.0000.01117.05
7.2.60.0090.00316.80
7.2.50.0080.00817.05
7.2.40.0060.00616.80
7.2.30.0030.01316.96
7.2.20.0060.01017.04
7.2.10.0030.00917.08
7.2.00.0060.00917.87
7.1.330.0070.00915.72
7.1.320.0100.00315.77
7.1.310.0050.00815.63
7.1.300.0060.00515.75
7.1.290.0100.00315.67
7.1.280.0070.00615.63
7.1.270.0070.00415.72
7.1.260.0100.00515.73
7.1.250.0030.01015.86
7.1.240.0060.00315.77
7.1.230.0030.00715.82
7.1.220.0060.00315.49
7.1.210.0040.00815.80
7.1.200.0000.01315.47
7.1.190.0060.00915.58
7.1.180.0070.00415.90
7.1.170.0030.00515.92
7.1.160.0040.00815.52
7.1.150.0080.00015.66
7.1.140.0070.00415.70
7.1.130.0050.00515.66
7.1.120.0030.01215.92
7.1.110.0030.00615.68
7.1.100.0020.01116.91
7.1.90.0120.00315.92
7.1.80.0070.00715.78
7.1.70.0030.00816.39
7.1.60.0080.01017.88
7.1.50.0090.01725.21
7.1.40.0030.00715.68
7.1.30.0070.00415.73
7.1.20.0120.00315.60
7.1.10.0000.01015.94
7.1.00.0070.01919.13
7.0.330.0060.00615.35
7.0.320.0070.00315.11
7.0.310.0070.00715.46
7.0.300.0070.00315.45
7.0.290.0030.01315.34
7.0.280.0040.01115.22
7.0.270.0030.00915.54
7.0.260.0070.00715.44
7.0.250.0040.00715.21
7.0.240.0070.00715.53
7.0.230.0060.00915.18
7.0.220.0070.00415.61
7.0.210.0040.01115.30
7.0.200.0040.00316.05
7.0.190.0030.00615.51
7.0.180.0070.00715.52
7.0.170.0000.01315.54
7.0.160.0120.00315.45
7.0.150.0000.00915.53
7.0.140.0100.03818.74
7.0.130.0000.00915.43
7.0.120.0100.00415.30
7.0.110.0000.01315.53
7.0.100.0080.00815.54
7.0.90.0090.00915.35
7.0.80.0060.00615.36
7.0.70.0040.01215.54
7.0.60.0030.03617.61
7.0.50.0010.04616.48
7.0.40.0100.03316.73
7.0.30.0150.03316.77
7.0.20.0120.03016.84
7.0.10.0060.04216.72
7.0.00.0100.04216.86
5.6.400.0060.00314.64
5.6.390.0050.00514.32
5.6.380.0070.00614.46
5.6.370.0130.00314.36
5.6.360.0040.00813.97
5.6.350.0040.01114.12
5.6.340.0000.01414.27
5.6.330.0120.00013.90
5.6.320.0060.00914.15
5.6.310.0000.01314.32
5.6.300.0060.00614.53
5.6.290.0110.00314.11
5.6.280.0080.03717.54
5.6.270.0060.00914.42
5.6.260.0100.00614.46
5.6.250.0030.01414.44
5.6.240.0030.01014.20
5.6.230.0060.00914.58
5.6.220.0110.00414.42
5.6.210.0070.04717.49
5.6.200.0100.03716.32
5.6.190.0050.03917.50
5.6.180.0160.03817.33
5.6.170.0180.01817.39
5.6.160.0120.02017.28
5.6.150.0020.02516.43
5.6.140.0090.02216.20
5.6.130.0070.04516.33
5.6.120.0110.03817.69
5.6.110.0070.04017.61
5.6.100.0050.04017.70
5.6.90.0140.03717.71
5.6.80.0120.03717.43
5.6.70.0080.00814.22
5.6.60.0060.00814.15
5.6.50.0090.00313.89
5.6.40.0000.01414.21
5.6.30.0040.01114.21
5.6.20.0050.00814.19
5.6.10.0040.01114.05
5.6.00.0100.00314.24
5.5.380.0030.00914.27
5.5.370.0090.00014.18
5.5.360.0120.00314.14
5.5.350.0150.04617.27
5.5.340.0150.03516.01
5.5.330.0050.04917.15
5.5.320.0200.04117.27
5.5.310.0150.02017.03
5.5.300.0030.02516.16
5.5.290.0030.04916.12
5.5.280.0060.02517.46
5.5.270.0030.05217.52
5.5.260.0050.02517.40
5.5.250.0020.05017.43
5.5.240.0050.04317.28
5.5.230.0030.01014.09
5.5.220.0030.00714.35
5.5.210.0080.00514.03
5.5.200.0100.00014.42
5.5.190.0070.00714.35
5.5.180.0030.01314.30
5.5.170.0030.01214.25
5.5.160.0090.00414.05
5.5.150.0060.00614.18
5.5.140.0040.00413.95
5.5.130.0150.00014.12
5.5.120.0000.01314.12
5.5.110.0040.01113.93
5.5.100.0000.01314.07
5.5.90.0040.00714.29
5.5.80.0060.00913.79
5.5.70.0060.00914.16
5.5.60.0080.00013.98
5.5.50.0080.00314.05
5.5.40.0080.00313.77
5.5.30.0060.00314.08
5.5.20.0150.00014.06
5.5.10.0030.00714.21
5.5.00.0070.00713.93
5.4.450.0250.02915.16
5.4.440.0230.02815.13
5.4.430.0230.02015.26
5.4.420.0430.01815.08
5.4.410.0490.02315.12
5.4.400.0300.02314.98
5.4.390.0330.02515.05
5.4.380.0410.02115.02
5.4.370.0420.02014.91
5.4.360.0370.02115.14
5.4.350.0420.01714.97
5.4.340.0440.01615.00
5.4.330.0120.00010.88
5.4.320.0350.02015.01
5.4.310.0210.02315.19
5.4.300.0410.02414.91
5.4.290.0260.02415.09
5.4.280.0460.01815.05
5.4.270.0120.03114.80
5.4.260.0290.02214.79
5.4.250.0350.02515.07
5.4.240.0270.02014.92
5.4.230.0280.02515.00
5.4.220.0130.02815.01
5.4.210.0290.02414.90
5.4.200.0460.02014.98
5.4.190.0390.01914.84
5.4.180.0360.02415.02
5.4.170.0130.02314.97
5.4.160.0370.02314.92
5.4.150.0290.02114.93
5.4.140.0450.01913.49
5.4.130.0320.02313.80
5.4.120.0100.01513.68
5.4.110.0230.02513.62
5.4.100.0260.02313.73
5.4.90.0300.01913.61
5.4.80.0330.01313.72
5.4.70.0320.02213.59
5.4.60.0250.02613.69
5.4.50.0280.02313.49
5.4.40.0100.02613.68
5.4.30.0390.01613.66
5.4.20.0440.01913.75
5.4.10.0500.02013.68
5.4.00.0360.01813.38
5.3.290.0300.04015.23
5.3.280.0800.04015.23
5.3.270.0670.04015.22
5.3.260.0570.04715.22
5.3.250.0630.05315.22
5.3.240.0430.04015.22
5.3.230.0770.03715.22
5.3.220.0670.02715.22
5.3.210.0400.04315.22
5.3.200.0730.04315.22
5.3.190.0600.04015.22
5.3.180.0400.04015.22
5.3.170.0530.04315.22
5.3.160.0400.03715.21
5.3.150.0830.03715.21
5.3.140.0330.04715.21
5.3.130.0470.04015.21
5.3.120.0700.03015.21
5.3.110.0700.03315.21
5.3.100.0900.02315.21
5.3.90.0630.03315.21
5.3.80.0270.04715.21
5.3.70.0430.03315.21
5.3.60.0200.03315.21
5.3.50.0530.04015.21
5.3.40.0830.03715.21
5.3.30.0930.03315.21
5.3.20.0230.04015.21
5.3.10.0170.04015.21
5.3.00.0530.04715.21
5.2.170.0530.03715.21
5.2.160.0470.03715.21
5.2.150.0370.03715.21
5.2.140.0570.02015.21
5.2.130.0230.03315.21
5.2.120.0500.04715.21
5.2.110.0470.03315.21
5.2.100.0470.03015.21
5.2.90.0870.02315.21
5.2.80.0370.03715.21
5.2.70.0830.03715.21
5.2.60.0330.02715.21
5.2.50.0470.03315.21
5.2.40.0630.03315.21
5.2.30.0330.03315.21
5.2.20.0230.03315.21
5.2.10.0330.02015.21
5.2.00.0270.02715.21
5.1.60.0430.03015.21
5.1.50.0430.02315.21
5.1.40.0430.01715.21
5.1.30.0470.02715.21
5.1.20.0300.03315.21
5.1.10.0500.04015.21
5.1.00.0370.04015.21
5.0.50.0130.01715.21
5.0.40.0200.01715.21
5.0.30.0370.02315.20
5.0.20.0300.01315.20
5.0.10.0200.02015.20
5.0.00.0130.03015.20
4.4.90.0230.01015.21
4.4.80.0230.01715.21
4.4.70.0170.01315.21
4.4.60.0100.01715.21
4.4.50.0170.01715.21
4.4.40.0000.02015.21
4.4.30.0030.02315.21
4.4.20.0070.03015.21
4.4.10.0170.01715.21
4.4.00.0100.02315.21
4.3.110.0300.01715.20
4.3.100.0370.01315.20
4.3.90.0230.01315.20
4.3.80.0170.02715.20
4.3.70.0370.01715.20
4.3.60.0100.01715.20
4.3.50.0070.01715.20
4.3.40.0200.02015.20
4.3.30.0000.01715.20
4.3.20.0030.01715.20
4.3.10.0000.02015.20
4.3.00.0030.02315.20

preferences:
30.94 ms | 403 KiB | 5 Q