3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = '<div class="wrap"> <div class="wp-checkbox" data-value="zf">content</div> <div class="wp-checkbox" data-value="tdp">content</div> </div>'; $pattern = '/=\"zf\">.*?<\/div>/'; $pattern2 = '/=\"tdp\">.*?<\/div>/'; $html = preg_replace( $pattern, '="zf">new content of div</div>', $html ); $html = preg_replace( $pattern2, '="tdp">new content of another div</div>', $html ); echo $html;

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.0140.00716.63
8.3.60.0070.01118.56
8.3.50.0060.00918.44
8.3.40.0090.00618.88
8.3.30.0090.00618.83
8.3.20.0050.00320.66
8.3.10.0040.00420.20
8.3.00.0040.00422.58
8.2.190.0090.00917.00
8.2.180.0100.01017.00
8.2.170.0090.00622.96
8.2.160.0070.01022.01
8.2.150.0050.00224.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0000.00826.16
8.2.110.0030.00620.54
8.2.100.0090.00317.97
8.2.90.0000.00818.16
8.2.80.0040.00419.16
8.2.70.0030.00617.80
8.2.60.0080.00018.09
8.2.50.0000.00818.10
8.2.40.0030.00521.20
8.2.30.0000.00719.16
8.2.20.0000.00718.11
8.2.10.0080.00019.45
8.2.00.0080.00019.33
8.1.280.0150.00625.92
8.1.270.0070.00024.66
8.1.260.0120.00626.35
8.1.250.0080.00028.09
8.1.240.0060.00323.77
8.1.230.0040.00722.05
8.1.220.0060.00317.79
8.1.210.0040.00418.84
8.1.200.0000.00917.38
8.1.190.0000.00817.23
8.1.180.0030.00518.10
8.1.170.0080.00018.64
8.1.160.0040.00419.03
8.1.150.0050.00218.73
8.1.140.0000.00720.30
8.1.130.0000.00720.13
8.1.120.0000.00717.46
8.1.110.0040.00417.55
8.1.100.0000.00717.41
8.1.90.0020.00517.59
8.1.80.0080.00017.61
8.1.70.0000.00717.43
8.1.60.0040.00417.57
8.1.50.0000.00817.63
8.1.40.0030.00517.54
8.1.30.0040.00417.74
8.1.20.0040.00417.65
8.1.10.0030.00517.54
8.1.00.0040.00417.64
8.0.300.0000.00720.09
8.0.290.0080.00016.75
8.0.280.0000.00718.42
8.0.270.0080.00016.85
8.0.260.0080.00020.14
8.0.250.0000.00817.02
8.0.240.0000.00717.06
8.0.230.0050.00516.93
8.0.220.0000.00716.98
8.0.210.0030.00316.88
8.0.200.0000.00716.93
8.0.190.0070.00016.93
8.0.180.0080.00016.91
8.0.170.0100.00017.03
8.0.160.0000.00816.90
8.0.150.0000.00716.79
8.0.140.0000.00716.83
8.0.130.0000.00513.41
8.0.120.0050.00316.95
8.0.110.0040.00417.05
8.0.100.0040.00416.85
8.0.90.0000.00717.00
8.0.80.0060.00917.02
8.0.70.0040.00416.86
8.0.60.0000.00716.96
8.0.50.0000.00716.88
8.0.30.0080.01116.98
8.0.20.0100.01017.09
8.0.10.0040.00417.16
8.0.00.0090.01017.01
7.4.330.0000.00515.55
7.4.320.0030.00316.73
7.4.300.0070.00016.74
7.4.290.0040.00416.57
7.4.280.0110.00016.65
7.4.270.0070.00016.67
7.4.260.0030.00313.41
7.4.250.0000.00716.65
7.4.240.0030.00316.65
7.4.230.0050.00216.46
7.4.220.0040.00416.63
7.4.210.0060.00916.80
7.4.200.0070.00016.70
7.4.130.0180.00316.61
7.4.120.0140.00316.42
7.4.110.0160.00316.54
7.4.100.0150.00616.68
7.4.90.0090.00916.84
7.4.80.0110.00719.39
7.4.70.0100.00616.53
7.4.60.0130.01016.55
7.4.50.0000.01716.80
7.4.40.0090.01516.64
7.4.10.0100.00715.24
7.4.00.0080.00714.96
7.3.330.0030.00516.36
7.3.320.0000.00513.23
7.3.310.0000.00816.43
7.3.300.0030.00316.20
7.3.290.0000.00716.36
7.3.280.0130.00316.40
7.3.260.0130.00516.45
7.3.240.0110.00616.51
7.3.230.0110.01116.42
7.3.210.0090.01616.59
7.3.200.0140.00316.29
7.3.190.0130.00716.59
7.3.180.0070.00716.63
7.3.170.0130.00316.48
7.3.160.0080.00816.60
7.3.130.0040.01414.76
7.3.120.0130.00314.92
7.3.110.0070.01314.90
7.3.100.0090.01014.57
7.3.90.0080.00615.06
7.3.80.0060.00814.92
7.3.70.0070.00614.89
7.3.60.0090.00514.83
7.3.50.0040.00814.88
7.3.40.0040.00914.76
7.3.30.0050.01114.89
7.3.20.0120.00315.36
7.3.10.0070.00715.37
7.3.00.0090.00615.48
7.2.330.0060.01216.89
7.2.320.0000.01716.73
7.2.310.0100.00716.74
7.2.300.0090.00916.93
7.2.290.0030.01316.61
7.2.260.0060.01315.16
7.2.250.0030.01615.34
7.2.240.0040.01115.23
7.2.230.0080.00715.11
7.2.220.0090.00715.10
7.2.210.0080.00615.15
7.2.200.0080.00614.93
7.2.190.0080.00815.10
7.2.180.0050.01015.00
7.2.170.0090.00614.89
7.2.160.0040.01214.96
7.2.150.0050.01015.75
7.2.140.0070.00915.63
7.2.130.0100.00515.57
7.2.120.0080.00815.58
7.2.110.0090.00715.71
7.2.100.0100.00715.61
7.2.90.0080.00915.72
7.2.80.0100.00815.84
7.2.70.0120.00415.85
7.2.60.0060.00815.84
7.2.50.0060.00915.78
7.2.40.0090.00815.57
7.2.30.0090.00715.67
7.2.20.0030.01215.76
7.2.10.0090.00615.55
7.2.00.0080.00915.68
7.1.330.0100.00315.67
7.1.320.0120.00414.67
7.1.310.0090.00714.67
7.1.300.0060.00914.76
7.1.290.0070.00714.68
7.1.280.0070.00814.54
7.1.270.0150.01014.62
7.1.260.0080.00714.78
7.1.250.0020.01414.69
7.1.240.0110.00315.71
7.1.230.0090.00315.95
7.1.220.0000.00815.94
7.1.210.0030.00815.88
7.1.200.0030.00815.82
7.1.190.0070.00715.77
7.1.180.0060.00615.85
7.1.170.0030.00716.08
7.1.160.0000.01715.82
7.1.150.0030.01315.96
7.1.140.0040.00715.94
7.1.130.0030.00615.95
7.1.120.0080.00515.71
7.1.110.0030.00916.10
7.1.100.0040.00416.05
7.1.90.0060.00616.05
7.1.80.0060.00916.06
7.1.70.0120.00616.07
7.1.60.0100.00715.70
7.1.50.0090.00615.83
7.1.40.0070.00716.01
7.1.30.0100.00316.07
7.1.20.0080.00415.72
7.1.10.0030.01015.91
7.1.00.0040.00715.69

preferences:
53.93 ms | 401 KiB | 5 Q