3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Toggle regex JIT: $iniSetSuccessfully = ini_set( "pcre.jit", "1" ); if ( $iniSetSuccessfully === false ) { throw new \Exception( "Unable to set pcre.jit" ); } // Test echo "\nTest with JIT enabled:\n"; preg_match( '/<(\w+)[\s\w\-]+ id="S44_i89ew">/', '<br><div id="S44_i89ew">', $matches ); var_dump( $matches ); // PCRE info ( not available on 3v4l.org ) $pcreReflector = new ReflectionExtension("pcre"); $pcreReflector->info(); $iniSetSuccessfully = ini_set( "pcre.jit", "0" ); if ( $iniSetSuccessfully === false ) { throw new \Exception( "Unable to set pcre.jit" ); } echo "\nTest with JIT disabled:\n"; // Test ( Note regex must be changed to prevent caching ) preg_match( '/<(\w+)[\s\w\-]+ id="S44_123">/', '<br><div id="S44_123">', $matches ); var_dump( $matches ); // PCRE info $pcreReflector = new ReflectionExtension("pcre"); $pcreReflector->info();

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.120.0110.01023.93
8.4.110.0100.01118.63
8.4.100.0100.01217.98
8.4.90.0120.00518.88
8.4.80.0050.00318.25
8.4.70.0140.00817.84
8.4.60.0130.00918.94
8.4.50.0130.00820.36
8.4.40.0100.01018.89
8.4.30.0130.00722.59
8.4.20.0030.01722.45
8.4.10.0060.00323.91
8.3.250.0130.00618.67
8.3.240.0150.00417.13
8.3.230.0110.00816.71
8.3.220.0120.00717.31
8.3.210.0100.00518.66
8.3.200.0040.00516.89
8.3.190.0100.00817.13
8.3.180.0080.00216.63
8.3.170.0100.01017.18
8.3.160.0120.00618.49
8.3.150.0040.01520.72
8.3.140.0150.00317.36
8.3.130.0000.00918.43
8.3.120.0060.00319.16
8.3.110.0050.00520.94
8.3.100.0060.00324.06
8.3.90.0040.00426.77
8.3.80.0210.00824.40
8.3.70.0290.00623.92
8.3.60.0190.00723.67
8.3.50.0070.00724.76
8.3.40.0160.00026.31
8.3.30.0200.00624.99
8.3.20.0150.00427.51
8.3.10.0050.00727.75
8.3.00.0090.00428.50
8.2.290.0120.00720.65
8.2.280.0110.01122.29
8.2.270.0150.00317.52
8.2.260.0120.00618.64
8.2.250.0100.01017.04
8.2.240.0080.00817.01
8.2.230.0000.00922.58
8.2.220.0070.00337.54
8.2.210.0130.00726.77
8.2.200.0120.00524.69
8.2.190.0220.00523.86
8.2.180.0130.01024.81
8.2.170.0220.00624.97
8.2.160.0230.00926.90
8.2.150.0180.00828.25
8.2.140.0180.00827.75
8.2.130.0130.00728.50
8.2.120.0160.00126.47
8.2.110.0110.00725.56
8.2.100.0120.00324.43
8.2.90.0300.00922.07
8.2.80.0230.00921.99
8.2.70.0260.00822.11
8.2.60.0300.00322.07
8.2.50.0230.00522.11
8.2.40.0260.00622.06
8.2.30.0260.00622.03
8.2.20.0240.00522.07
8.2.10.0260.00721.98
8.2.00.0250.00722.10
8.1.330.0120.00723.50
8.1.320.0120.00716.33
8.1.310.0090.00016.65
8.1.300.0030.01018.44
8.1.290.0200.00830.84
8.1.280.0240.00628.38
8.1.270.0170.00927.75
8.1.260.0150.01128.59
8.1.250.0230.00429.46
8.1.240.0190.00527.35
8.1.230.0160.00925.86
8.1.220.0280.00521.82
8.1.210.0290.00421.85
8.1.200.0220.00921.73
8.1.190.0240.00721.73
8.1.180.0260.00621.70
8.1.170.0290.00221.78
8.1.160.0270.00521.82
8.1.150.0230.00821.86
8.1.140.0260.00721.73
8.1.130.0190.00821.81
8.1.120.0170.00821.82
8.1.110.0280.00021.73
8.1.100.0200.00821.90
8.1.90.0180.00621.74
8.1.80.0130.01021.85
8.1.70.0200.00521.74
8.1.60.0220.00321.90
8.1.50.0270.00721.82
8.1.40.0260.00421.74
8.1.30.0260.00321.95
8.1.20.0240.00621.90
8.1.10.0220.01021.86
8.1.00.0240.00621.89
8.0.300.0260.00621.53
8.0.290.0240.00721.48
8.0.280.0260.00521.27
8.0.270.0220.01221.40
8.0.260.0220.00921.47
8.0.250.0250.00921.52
8.0.240.0260.00721.53
8.0.230.0230.00421.44
8.0.220.0220.00321.48
8.0.210.0220.00321.39
8.0.200.0180.00721.39
8.0.190.0180.00621.40
8.0.180.0230.00221.39
8.0.170.0260.00421.57
8.0.160.0280.00621.53
8.0.150.0270.00521.43
8.0.140.0260.00521.44
8.0.130.0260.00521.32
8.0.120.0260.00721.40
8.0.110.0270.00521.48
8.0.100.0250.00321.36
8.0.90.0230.00321.43
8.0.80.0250.00421.48
8.0.70.0260.00421.40
8.0.60.0200.00521.32
8.0.50.0250.00221.40
8.0.30.0220.00321.45
8.0.20.0190.00621.47
8.0.10.0190.00621.49

preferences:
60.1 ms | 403 KiB | 5 Q